"Fossies" - the Fresh Open Source Software Archive

Member "install-tl-20200916/tlpkg/tlperl/lib/Pod/Functions.pm" (10 Mar 2019, 14366 Bytes) of package /windows/misc/install-tl.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

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