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