Make the large file tests more robust/talkative as suggested by
[p5sagit/p5-mst-13.2.git] / lib / Pod / Functions.pm
index 033c579..960b847 100644 (file)
@@ -2,12 +2,16 @@ package Pod::Functions;
 
 #:vi:set ts=20
 
+our $VERSION = '1.00';
+
 require Exporter;
 
 @ISA = qw(Exporter);
 @EXPORT = qw(%Kinds %Type %Flavor %Type_Description @Type_Order);
 
-%Type_Description = (
+our(%Kinds, %Type, %Flavor);
+
+our %Type_Description = (
     'ARRAY'    => 'Functions for real @ARRAYs',
     'Binary'   => 'Functions for fixed length data or records',
     'File'     => 'Functions for filehandles, files, or directories',
@@ -30,7 +34,7 @@ require Exporter;
     'Namespace'        => 'Keywords altering or affecting scoping of identifiers',
 );
 
-@Type_Order = qw{
+our @Type_Order = qw{
     String
     Regexp
     Math
@@ -57,18 +61,20 @@ while (<DATA>) {
     chomp;
     s/#.*//;
     next unless $_;
-    ($name, $type, $text) = split " ", $_, 3;
+    my($name, $type, $text) = split " ", $_, 3;
     $Type{$name} = $type;
     $Flavor{$name} = $text;
-    for $type ( split /[,\s]+/, $type ) {
-       push @{$Kinds{$type}}, $name;
+    for my $t ( split /[,\s]+/, $type ) {
+       push @{$Kinds{$t}}, $name;
     }
 } 
 
+close DATA;
+
 unless (caller) { 
-    foreach $type ( @Type_Order ) {
-       $list = join(", ", sort @{$Kinds{$type}});
-       $typedesc = $Type_Description{$type} . ":";
+    foreach my $type ( @Type_Order ) {
+       my $list = join(", ", sort @{$Kinds{$type}});
+       my $typedesc = $Type_Description{$type} . ":";
        write;
     } 
 }
@@ -90,9 +96,9 @@ __DATA__
 abs    Math    absolute value function
 accept Socket  accept an incoming socket connect
 alarm  Process schedule a SIGALRM 
-atan2  Math    arctangent of Y/X 
+atan2  Math    arctangent of Y/X in the range -PI to PI
 bind   Socket  binds an address to a socket
-binmode        I/O     prepare binary files on old systems
+binmode        I/O     prepare binary files for I/O
 bless  Objects create an object 
 caller Flow,Namespace  get context of the current subroutine call
 chdir  File    change your current working directory
@@ -104,7 +110,7 @@ chr String  get character this number represents
 chroot File    make directory new root for path lookups
 close  I/O     close file (or pipe or socket) handle
 closedir       I/O     close directory handle
-connect        Socket  connect to a remove socket
+connect        Socket  connect to a remote socket
 continue       Flow    optional trailing block in a while or foreach 
 cos    Math    cosine function
 crypt  String  one-way passwd-style encryption
@@ -123,12 +129,12 @@ endprotoent       Network be done using protocols file
 endpwent       User    be done using passwd file
 endservent     Network be done using services file
 eof    I/O     test a filehandle for its end
-eval   Flow,Misc       catch exceptions or compile code
+eval   Flow,Misc       catch exceptions or compile and run code
 exec   Process abandon this program to run another
 exists HASH    test whether a hash key is present
 exit   Flow    terminate this program
 exp    Math    raise I<e> to a power
-fcntl  File    file control system all
+fcntl  File    file control system call
 fileno I/O     return file descriptor from filehandle
 flock  I/O     lock an entire file with an advisory lock
 fork   Process create a new process just like this one
@@ -145,7 +151,7 @@ getlogin    User    return who logged in at this tty
 getnetbyaddr   Network get network record given its address
 getnetbyname   Network get networks record given name
 getnetent      Network get next networks record 
-getpeername    Socket  find the other hend of a socket connection
+getpeername    Socket  find the other end of a socket connection
 getpgrp        Process get process group
 getppid        Process get parent process ID
 getpriority    Process get current nice value
@@ -180,6 +186,7 @@ link        File    create a hard link in the filesytem
 listen Socket  register your socket as a server 
 local  Misc,Namespace  create a temporary value for a global variable (dynamic scoping)
 localtime      Time    convert UNIX time into record or string using local time
+lock   Threads get a thread lock on a variable, subroutine, or method
 log    Math    retrieve the natural logarithm for a number
 lstat  File    stat a symbolic link
 m//    Regexp  match a string with a regular expression pattern
@@ -251,7 +258,7 @@ shmget      SysV    get SysV shared memory segment identifier
 shmread        SysV    read SysV shared memory 
 shmwrite       SysV    write SysV shared memory 
 shutdown       Socket  close down just half of a socket connection
-sin    Math    return the sin of a number
+sin    Math    return the sine of a number
 sleep  Process block for some number of seconds
 socket Socket  create a socket
 socketpair     Socket  create a pair of sockets
@@ -293,7 +300,7 @@ values      HASH    return a list of the values in a hash
 vec    Binary  test or set particular bits in a string
 wait   Process wait for any child process to die
 waitpid        Process wait for  a particular child process to die
-wantarray      Misc,Flow       get list vs array context of current subroutine call
+wantarray      Misc,Flow       get void vs scalar vs list context of current subroutine call
 warn   I/O     print debugging info
 write  I/O     print a picture record
 y///   String  transliterate a string