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