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