Add a $VERSION, strict and some documentation to Tie::StdHandle.
authorNicholas Clark <nick@ccl4.org>
Sun, 16 Nov 2008 23:05:35 +0000 (23:05 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 16 Nov 2008 23:05:35 +0000 (23:05 +0000)
p4raw-id: //depot/perl@34859

lib/Tie/StdHandle.pm

index 93db289..3a1a3db 100644 (file)
@@ -1,8 +1,39 @@
 package Tie::StdHandle; 
 
+use strict;
+
 use Tie::Handle;
-our @ISA = 'Tie::Handle';
-use Carp;
+use vars qw(@ISA $VERSION);
+@ISA = 'Tie::Handle';
+$VERSION = '4.2';
+
+=head1 NAME
+
+Tie::StdHandle - base class definitions for tied handles
+
+=head1 SYNOPSIS
+
+    package NewHandle;
+    require Tie::Handle;
+
+    @ISA = qw(Tie::Handle);
+
+    sub READ { ... }           # Provide a needed method
+    sub TIEHANDLE { ... }      # Overrides inherited method
+
+
+    package main;
+
+    tie *FH, 'NewHandle';
+
+=head1 DESCRIPTION
+
+The B<Tie::StdHandle> package provide most methods for file handles described
+in L<perltie> (the exceptions are C<UNTIE> and C<DESTROY>).  It causes tied
+file handles to behave exactly like standard file handles and allow for
+selective overwriting of methods.
+
+=cut
 
 sub TIEHANDLE 
 {