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