home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / lib / Pod / Functions.pm < prev    next >
Text File  |  1999-09-12  |  13KB  |  303 lines

  1. package Pod::Functions;
  2.  
  3. #:vi:set ts=20
  4.  
  5. require Exporter;
  6.  
  7. @ISA = qw(Exporter);
  8. @EXPORT = qw(%Kinds %Type %Flavor %Type_Description @Type_Order);
  9.  
  10. %Type_Description = (
  11.     'ARRAY'    => 'Functions for real @ARRAYs',
  12.     'Binary'    => 'Functions for fixed length data or records',
  13.     'File'    => 'Functions for filehandles, files, or directories',
  14.     'Flow'    => 'Keywords related to control flow of your perl program',
  15.     'HASH'    => 'Functions for real %HASHes',
  16.     'I/O'    => 'Input and output functions',
  17.     'LIST'    => 'Functions for list data',
  18.     'Math'    => 'Numeric functions',
  19.     'Misc'    => 'Miscellaneous functions',
  20.     'Modules'    => 'Keywords related to perl modules',
  21.     'Network'    => 'Fetching network info',
  22.     'Objects'    => 'Keywords related to classes and object-orientedness',
  23.     'Process'    => 'Functions for processes and process groups',
  24.     'Regexp'    => 'Regular expressions and pattern matching',
  25.     'Socket'    => 'Low-level socket functions',
  26.     'String'    => 'Functions for SCALARs or strings',
  27.     'SysV'    => 'System V interprocess communication functions',
  28.     'Time'    => 'Time-related functions',
  29.     'User'    => 'Fetching user and group info',
  30.     'Namespace'    => 'Keywords altering or affecting scoping of identifiers',
  31. );
  32.  
  33. @Type_Order = qw{
  34.     String
  35.     Regexp
  36.     Math
  37.     ARRAY
  38.     LIST
  39.     HASH
  40.     I/O
  41.     Binary
  42.     File
  43.     Flow
  44.     Namespace
  45.     Misc
  46.     Process
  47.     Modules
  48.     Objects
  49.     Socket
  50.     SysV
  51.     User
  52.     Network
  53.     Time
  54. };
  55.  
  56. while (<DATA>) {
  57.     chomp;
  58.     s/#.*//;
  59.     next unless $_;
  60.     ($name, $type, $text) = split " ", $_, 3;
  61.     $Type{$name} = $type;
  62.     $Flavor{$name} = $text;
  63.     for $type ( split /[,\s]+/, $type ) {
  64.     push @{$Kinds{$type}}, $name;
  65.     }
  66.  
  67. close DATA;
  68.  
  69. unless (caller) { 
  70.     foreach $type ( @Type_Order ) {
  71.     $list = join(", ", sort @{$Kinds{$type}});
  72.     $typedesc = $Type_Description{$type} . ":";
  73.     write;
  74.     } 
  75. }
  76.  
  77. format = 
  78.  
  79. ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  80.     $typedesc 
  81. ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  82.     $typedesc 
  83.  ~~  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  84.     $list
  85. .
  86.  
  87. 1
  88.  
  89. __DATA__
  90. -X    File    a file test (-r, -x, etc)
  91. abs    Math    absolute value function
  92. accept    Socket    accept an incoming socket connect
  93. alarm    Process    schedule a SIGALRM 
  94. atan2    Math    arctangent of Y/X in the range -PI to PI
  95. bind    Socket    binds an address to a socket
  96. binmode    I/O    prepare binary files for I/O
  97. bless    Objects    create an object 
  98. caller    Flow,Namespace    get context of the current subroutine call
  99. chdir    File    change your current working directory
  100. chmod    File    changes the permissions on a list of files
  101. chomp    String     remove a trailing record separator from a string
  102. chop    String     remove the last character from a string
  103. chown    File    change the owership on a list of files
  104. chr    String     get character this number represents
  105. chroot    File    make directory new root for path lookups
  106. close    I/O    close file (or pipe or socket) handle
  107. closedir    I/O    close directory handle
  108. connect    Socket    connect to a remote socket
  109. continue    Flow    optional trailing block in a while or foreach 
  110. cos    Math    cosine function
  111. crypt    String    one-way passwd-style encryption
  112. dbmclose    Objects,I/O    breaks binding on a tied dbm file
  113. dbmopen    Objects,I/O    create binding on a tied dbm file
  114. defined    Misc    test whether a value, variable, or function is defined
  115. delete    HASH    deletes a value from a hash
  116. die    I/O,Flow    raise an exception or bail out
  117. do    Flow,Modules    turn a BLOCK into a TERM
  118. dump    Misc,Flow    create an immediate core dump
  119. each    HASH    retrieve the next key/value pair from a hash
  120. endgrent    User    be done using group file
  121. endhostent    User    be done using hosts file
  122. endnetent    User    be done using networks file
  123. endprotoent    Network    be done using protocols file
  124. endpwent    User    be done using passwd file
  125. endservent    Network    be done using services file
  126. eof    I/O    test a filehandle for its end
  127. eval    Flow,Misc    catch exceptions or compile and run code
  128. exec    Process    abandon this program to run another
  129. exists    HASH    test whether a hash key is present
  130. exit    Flow    terminate this program
  131. exp    Math    raise I<e> to a power
  132. fcntl    File    file control system call
  133. fileno    I/O    return file descriptor from filehandle
  134. flock    I/O    lock an entire file with an advisory lock
  135. fork    Process    create a new process just like this one
  136. format    I/O    declare a picture format with use by the write() function
  137. formline    Misc    internal function used for formats
  138. getc    I/O    get    the next character from the filehandle
  139. getgrent    User    get next group record 
  140. getgrgid    User    get group record given group user ID
  141. getgrnam    User    get group record given group name
  142. gethostbyaddr    Network    get host record given its address
  143. gethostbyname    Network    get host record given name
  144. gethostent    Network    get next hosts record 
  145. getlogin    User    return who logged in at this tty
  146. getnetbyaddr    Network    get network record given its address
  147. getnetbyname    Network    get networks record given name
  148. getnetent    Network    get next networks record 
  149. getpeername    Socket    find the other end of a socket connection
  150. getpgrp    Process    get process group
  151. getppid    Process    get parent process ID
  152. getpriority    Process    get current nice value
  153. getprotobyname    Network    get protocol record given name
  154. getprotobynumber    Network    get protocol record numeric protocol
  155. getprotoent    Network    get next protocols record
  156. getpwent    User    get next passwd record
  157. getpwnam    User    get passwd record given user login name
  158. getpwuid    User    get passwd record given user ID
  159. getservbyname    Network    get services record given its name
  160. getservbyport    Network    get services record given numeric port
  161. getservent    Network    get next services record 
  162. getsockname    Socket    retrieve the sockaddr for a given socket
  163. getsockopt    Socket    get socket options on a given socket
  164. glob    File        expand filenames using wildcards
  165. gmtime    Time    convert UNIX time into record or string using Greenwich time
  166. goto    Flow    create spaghetti code
  167. grep    LIST    locate elements in a list test true against a given criterion
  168. hex    Math,String    convert a string to a hexadecimal number
  169. import    Modules,Namespace    patch a module's namespace into your own
  170. index    String    find a substring within a string
  171. int    Math    get the integer portion of a number
  172. ioctl    File    system-dependent device control system call
  173. join    LIST    join a list into a string using a separator
  174. keys    HASH    retrieve list of indices from a hash
  175. kill    Process    send a signal to a process or process group
  176. last    Flow    exit a block prematurely
  177. lc    String    return lower-case version of a string
  178. lcfirst    String    return a string with just the next letter in lower case
  179. length    String    return the number of bytes in a string
  180. link    File    create a hard link in the filesytem
  181. listen    Socket    register your socket as a server 
  182. local    Misc,Namespace    create a temporary value for a global variable (dynamic scoping)
  183. localtime    Time    convert UNIX time into record or string using local time
  184. lock    Threads    get a thread lock on a variable, subroutine, or method
  185. log    Math    retrieve the natural logarithm for a number
  186. lstat    File    stat a symbolic link
  187. m//    Regexp    match a string with a regular expression pattern
  188. map    LIST    apply a change to a list to get back a new list with the changes
  189. mkdir    File    create a directory
  190. msgctl    SysV    SysV IPC message control operations
  191. msgget    SysV    get SysV IPC message queue
  192. msgrcv    SysV    receive a SysV IPC message from a message queue
  193. msgsnd    SysV    send a SysV IPC message to a message queue
  194. my    Misc,Namespace    declare and assign a local variable (lexical scoping)
  195. next    Flow    iterate a block prematurely
  196. no    Modules    unimport some module symbols or semantics at compile time
  197. package    Modules,Objects,Namespace    declare a separate global namespace
  198. prototype    Flow,Misc    get the prototype (if any) of a subroutine
  199. oct    String,Math    convert a string to an octal number
  200. open    File    open a file, pipe, or descriptor
  201. opendir    File    open a directory
  202. ord    String    find a character's numeric representation
  203. pack    Binary,String    convert a list into a binary representation
  204. pipe    Process    open a pair of connected filehandles
  205. pop    ARRAY    remove the last element from an array and return it
  206. pos    Regexp    find or set the offset for the last/next m//g search
  207. print    I/O    output a list to a filehandle
  208. printf    I/O      output a formatted list to a filehandle
  209. push    ARRAY    append one or more elements to an array
  210. q/STRING/    String    singly quote a string
  211. qq/STRING/    String    doubly quote a string
  212. quotemeta    Regexp    quote regular expression magic characters
  213. qw/STRING/    LIST    quote a list of words
  214. qx/STRING/    Process    backquote quote a string
  215. qr/PATTERN/    Regexp    Compile pattern 
  216. rand    Math    retrieve the next pseudorandom number 
  217. read    I/O,Binary    fixed-length buffered input from a filehandle
  218. readdir    I/O    get a directory from a directory handle
  219. readline    I/O    fetch a record from a file
  220. readlink    File    determine where a symbolic link is pointing
  221. recv    Socket    receive a message over a Socket
  222. redo    Flow    start this loop iteration over again
  223. ref    Objects    find out the type of thing being referenced
  224. rename    File    change a filename
  225. require    Modules    load in external functions from a library at runtime
  226. reset    Misc    clear all variables of a given name
  227. return    Flow    get out of a function early
  228. reverse    String,LIST    flip a string or a list
  229. rewinddir    I/O    reset directory handle
  230. rindex    String    right-to-left substring search
  231. rmdir    File    remove a directory
  232. s///    Regexp    replace a pattern with a string
  233. scalar    Misc    force a scalar context
  234. seek    I/O    reposition file pointer for random-access I/O
  235. seekdir    I/O    reposition directory pointer 
  236. select    I/O    reset default output or do I/O multiplexing
  237. semctl    SysV    SysV semaphore control operations
  238. semget    SysV    get set of SysV semaphores
  239. semop    SysV    SysV semaphore operations
  240. send    Socket    send a message over a socket
  241. setgrent    User    prepare group file for use
  242. sethostent    Network    prepare hosts file for use
  243. setnetent    Network    prepare networks file for use
  244. setpgrp    Process    set the process group of a process
  245. setpriority    Process    set a process's nice value
  246. setprotoent    Network    prepare protocols file for use
  247. setpwent    User    prepare passwd file for use
  248. setservent    Network    prepare services file for use
  249. setsockopt    Socket    set some socket options
  250. shift    ARRAY    remove the first element of an array, and return it
  251. shmctl    SysV    SysV shared memory operations
  252. shmget    SysV    get SysV shared memory segment identifier
  253. shmread    SysV    read SysV shared memory 
  254. shmwrite    SysV    write SysV shared memory 
  255. shutdown    Socket    close down just half of a socket connection
  256. sin    Math    return the sine of a number
  257. sleep    Process    block for some number of seconds
  258. socket    Socket    create a socket
  259. socketpair    Socket    create a pair of sockets
  260. sort    LIST    sort a list of values 
  261. splice    ARRAY    add or remove elements anywhere in an array
  262. split    Regexp    split up a string using a regexp delimiter
  263. sprintf    String    formatted print into a string    
  264. sqrt    Math    square root function
  265. srand    Math    seed the random number generator
  266. stat    File    get a file's status information
  267. study    Regexp    optimize input data for repeated searches
  268. sub    Flow    declare a subroutine, possibly anonymously
  269. substr    String    get or alter a portion of a stirng
  270. symlink    File    create a symbolic link to a file
  271. syscall    I/O,Binary    execute an arbitrary system call
  272. sysread    I/O,Binary    fixed-length unbuffered input from a filehandle
  273. sysseek    I/O,Binary    position I/O pointer on handle used with sysread and syswrite
  274. system    Process    run a separate program 
  275. syswrite    I/O,Binary    fixed-length unbuffered output to a filehandle
  276. tell    I/O    get current seekpointer on a filehandle
  277. telldir    I/O    get current seekpointer on a directory handle
  278. tie    Objects    bind a variable to an object class 
  279. time    Time    return number of seconds since 1970
  280. times    Process,Time    return elapsed time for self and child processes
  281. tr///    String    transliterate a string
  282. truncate    I/O    shorten a file
  283. uc    String    return upper-case version of a string
  284. ucfirst    String    return a string with just the next letter in upper case
  285. umask    File    set file creation mode mask
  286. undef    Misc    remove a variable or function definition
  287. unlink    File    remove one link to a file
  288. unpack    Binary,LIST    convert binary structure into normal perl variables
  289. unshift    ARRAY    prepend more elements to the beginning of a list
  290. untie    Objects    break a tie binding to a variable
  291. use    Modules,Namespace    load a module and import its namespace
  292. use     Objects    load in a module at compile time
  293. utime    File    set a file's last access and modify times
  294. values    HASH    return a list of the values in a hash
  295. vec    Binary    test or set particular bits in a string
  296. wait    Process    wait for any child process to die
  297. waitpid    Process    wait for  a particular child process to die
  298. wantarray    Misc,Flow    get list vs array context of current subroutine call
  299. warn    I/O    print debugging info
  300. write    I/O    print a picture record
  301. y///    String    transliterate a string
  302.