Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

296 lines
12 KiB

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