home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _9a3ee4f80d41854e579056bc3cf5bfc4 < prev    next >
Text File  |  2000-03-23  |  69KB  |  1,430 lines

  1. <HTML>
  2. <HEAD>
  3. <TITLE>perlmodlib - constructing new Perl modules and finding existing ones</TITLE>
  4. <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
  5. <LINK REV="made" HREF="mailto:">
  6. </HEAD>
  7.  
  8. <BODY>
  9. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  10. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  11. <STRONG><P CLASS=block> perlmodlib - constructing new Perl modules and finding existing ones</P></STRONG>
  12. </TD></TR>
  13. </TABLE>
  14.  
  15. <A NAME="__index__"></A>
  16. <!-- INDEX BEGIN -->
  17.  
  18. <UL>
  19.  
  20.     <LI><A HREF="#name">NAME</A></LI>
  21.     <LI><A HREF="#description">DESCRIPTION</A></LI>
  22.     <LI><A HREF="#the perl module library">THE PERL MODULE LIBRARY</A></LI>
  23.     <UL>
  24.  
  25.         <LI><A HREF="#pragmatic modules">Pragmatic Modules</A></LI>
  26.         <LI><A HREF="#standard modules">Standard Modules</A></LI>
  27.         <LI><A HREF="#extension modules">Extension Modules</A></LI>
  28.     </UL>
  29.  
  30.     <LI><A HREF="#cpan">CPAN</A></LI>
  31.     <LI><A HREF="#modules: creation, use, and abuse">Modules: Creation, Use, and Abuse</A></LI>
  32.     <UL>
  33.  
  34.         <LI><A HREF="#guidelines for module creation">Guidelines for Module Creation</A></LI>
  35.         <LI><A HREF="#guidelines for converting perl 4 library scripts into modules">Guidelines for Converting Perl 4 Library Scripts into Modules</A></LI>
  36.         <LI><A HREF="#guidelines for reusing application code">Guidelines for Reusing Application Code</A></LI>
  37.     </UL>
  38.  
  39.     <LI><A HREF="#note">NOTE</A></LI>
  40. </UL>
  41. <!-- INDEX END -->
  42.  
  43. <HR>
  44. <P>
  45. <H1><A NAME="name">NAME</A></H1>
  46. <P>perlmodlib - constructing new Perl modules and finding existing ones</P>
  47. <P>
  48. <HR>
  49. <H1><A NAME="description">DESCRIPTION</A></H1>
  50. <P>
  51. <HR>
  52. <H1><A NAME="the perl module library">THE PERL MODULE LIBRARY</A></H1>
  53. <P>Many modules are included the Perl distribution.  These are described
  54. below, and all end in <EM>.pm</EM>.  You may discover compiled library
  55. file (usually ending in <EM>.so</EM>) or small pieces of modules to be
  56. autoloaded (ending in <EM>.al</EM>); these were automatically generated
  57. by the installation process.  You may also discover files in the
  58. library directory that end in either <EM>.pl</EM> or <EM>.ph</EM>.  These are
  59. old libraries supplied so that old programs that use them still
  60. run.  The <EM>.pl</EM> files will all eventually be converted into standard
  61. modules, and the <EM>.ph</EM> files made by <STRONG>h2ph</STRONG> will probably end up
  62. as extension modules made by <STRONG>h2xs</STRONG>.  (Some <EM>.ph</EM> values may
  63. already be available through the POSIX, Errno, or Fcntl modules.)
  64. The <STRONG>pl2pm</STRONG> file in the distribution may help in your conversion,
  65. but it's just a mechanical process and therefore far from bulletproof.</P>
  66. <P>
  67. <H2><A NAME="pragmatic modules">Pragmatic Modules</A></H2>
  68. <P>They work somewhat like compiler directives (pragmata) in that they
  69. tend to affect the compilation of your program, and thus will usually
  70. work well only when used within a <A HREF="../../lib/Pod/perlfunc.html#item_use"><CODE>use</CODE></A>, or <A HREF="../../lib/Pod/perlfunc.html#item_no"><CODE>no</CODE></A>.  Most of these
  71. are lexically scoped, so an inner BLOCK may countermand them
  72. by saying:</P>
  73. <PRE>
  74.     no integer;
  75.     no strict 'refs';
  76.     no warnings;</PRE>
  77. <P>which lasts until the end of that BLOCK.</P>
  78. <P>Some pragmas are lexically scoped--typically those that affect the
  79. <CODE>$^H</CODE> hints variable.  Others affect the current package instead,
  80. like <CODE>use vars</CODE> and <CODE>use subs</CODE>, which allow you to predeclare a
  81. variables or subroutines within a particular <EM>file</EM> rather than
  82. just a block.  Such declarations are effective for the entire file
  83. for which they were declared.  You cannot rescind them with <CODE>no
  84. vars</CODE> or <CODE>no subs</CODE>.</P>
  85. <P>The following pragmas are defined (and have their own documentation).</P>
  86. <DL>
  87. <DT><STRONG><A NAME="item_attributes">attributes</A></STRONG><BR>
  88. <DD>
  89. Get/set subroutine or variable attributes
  90. <P></P>
  91. <DT><STRONG><A NAME="item_attrs">attrs</A></STRONG><BR>
  92. <DD>
  93. Set/get attributes of a subroutine (deprecated)
  94. <P></P>
  95. <DT><STRONG><A NAME="item_autouse">autouse</A></STRONG><BR>
  96. <DD>
  97. Postpone load of modules until a function is used
  98. <P></P>
  99. <DT><STRONG><A NAME="item_base">base</A></STRONG><BR>
  100. <DD>
  101. Establish IS-A relationship with base class at compile time
  102. <P></P>
  103. <DT><STRONG><A NAME="item_blib">blib</A></STRONG><BR>
  104. <DD>
  105. Use MakeMaker's uninstalled version of a package
  106. <P></P>
  107. <DT><STRONG><A NAME="item_caller">caller</A></STRONG><BR>
  108. <DD>
  109. Inherit pragmatic attributes from caller's context
  110. <P></P>
  111. <DT><STRONG><A NAME="item_charnames">charnames</A></STRONG><BR>
  112. <DD>
  113. Define character names for <CODE>\N{named}</CODE> string literal escape.
  114. <P></P>
  115. <DT><STRONG><A NAME="item_constant">constant</A></STRONG><BR>
  116. <DD>
  117. Declare constants
  118. <P></P>
  119. <DT><STRONG><A NAME="item_diagnostics">diagnostics</A></STRONG><BR>
  120. <DD>
  121. Force verbose warning diagnostics
  122. <P></P>
  123. <DT><STRONG><A NAME="item_fields">fields</A></STRONG><BR>
  124. <DD>
  125. Declare a class's attribute fields at compile-time
  126. <P></P>
  127. <DT><STRONG><A NAME="item_filetest">filetest</A></STRONG><BR>
  128. <DD>
  129. Control the filetest operators like <CODE>-r</CODE>, <CODE>-w</CODE> for AFS, etc.
  130. <P></P>
  131. <DT><STRONG><A NAME="item_integer">integer</A></STRONG><BR>
  132. <DD>
  133. Compute arithmetic in integer instead of double
  134. <P></P>
  135. <DT><STRONG><A NAME="item_less">less</A></STRONG><BR>
  136. <DD>
  137. Request less of something from the compiler (unimplemented)
  138. <P></P>
  139. <DT><STRONG><A NAME="item_lib">lib</A></STRONG><BR>
  140. <DD>
  141. Manipulate @INC at compile time
  142. <P></P>
  143. <DT><STRONG><A NAME="item_locale">locale</A></STRONG><BR>
  144. <DD>
  145. Use or avoid POSIX locales for built-in operations
  146. <P></P>
  147. <DT><STRONG><A NAME="item_ops">ops</A></STRONG><BR>
  148. <DD>
  149. Restrict unsafe operations when compiling
  150. <P></P>
  151. <DT><STRONG><A NAME="item_overload">overload</A></STRONG><BR>
  152. <DD>
  153. Overload Perl operations
  154. <P></P>
  155. <DT><STRONG><A NAME="item_re">re</A></STRONG><BR>
  156. <DD>
  157. Alter regular expression behavior
  158. <P></P>
  159. <DT><STRONG><A NAME="item_sigtrap">sigtrap</A></STRONG><BR>
  160. <DD>
  161. Enable simple signal handling
  162. <P></P>
  163. <DT><STRONG><A NAME="item_strict">strict</A></STRONG><BR>
  164. <DD>
  165. Restrict unsafe constructs
  166. <P></P>
  167. <DT><STRONG><A NAME="item_subs">subs</A></STRONG><BR>
  168. <DD>
  169. Predeclare subroutine names
  170. <P></P>
  171. <DT><STRONG><A NAME="item_utf8">utf8</A></STRONG><BR>
  172. <DD>
  173. Turn on UTF-8 and Unicode support
  174. <P></P>
  175. <DT><STRONG><A NAME="item_vars">vars</A></STRONG><BR>
  176. <DD>
  177. Predeclare global variable names (obsoleted by <A HREF="../../lib/Pod/perlfunc.html#item_our"><CODE>our())</CODE></A>
  178. <P></P>
  179. <DT><STRONG><A NAME="item_warnings">warnings</A></STRONG><BR>
  180. <DD>
  181. Control optional warnings
  182. <P></P></DL>
  183. <P>
  184. <H2><A NAME="standard modules">Standard Modules</A></H2>
  185. <P>Standard, bundled modules are all expected to behave in a well-defined
  186. manner with respect to namespace pollution because they use the
  187. Exporter module.  See their own documentation for details.</P>
  188. <DL>
  189. <DT><STRONG><A NAME="item_AnyDBM_File">AnyDBM_File</A></STRONG><BR>
  190. <DD>
  191. Provide framework for multiple DBM libraries
  192. <P></P>
  193. <DT><STRONG><A NAME="item_AutoLoader">AutoLoader</A></STRONG><BR>
  194. <DD>
  195. Load subroutines only on demand
  196. <P></P>
  197. <DT><STRONG><A NAME="item_AutoSplit">AutoSplit</A></STRONG><BR>
  198. <DD>
  199. Split a package for autoloading
  200. <P></P>
  201. <DT><STRONG><A NAME="item_B">B</A></STRONG><BR>
  202. <DD>
  203. Guts of the Perl code generator (aka compiler)
  204. <P></P>
  205. <DT><STRONG><A NAME="item_B%3A%3AAsmdata">B::Asmdata</A></STRONG><BR>
  206. <DD>
  207. Autogenerated data about Perl ops, used to generate bytecode
  208. <P></P>
  209. <DT><STRONG><A NAME="item_B%3A%3AAssembler">B::Assembler</A></STRONG><BR>
  210. <DD>
  211. Assemble Perl bytecode
  212. <P></P>
  213. <DT><STRONG><A NAME="item_B%3A%3ABblock">B::Bblock</A></STRONG><BR>
  214. <DD>
  215. Walk basic blocks
  216. <P></P>
  217. <DT><STRONG><A NAME="item_B%3A%3ABytecode">B::Bytecode</A></STRONG><BR>
  218. <DD>
  219. Perl compiler's bytecode backend
  220. <P></P>
  221. <DT><STRONG><A NAME="item_B%3A%3AC">B::C</A></STRONG><BR>
  222. <DD>
  223. Perl compiler's C backend
  224. <P></P>
  225. <DT><STRONG><A NAME="item_B%3A%3ACC">B::CC</A></STRONG><BR>
  226. <DD>
  227. Perl compiler's optimized C translation backend
  228. <P></P>
  229. <DT><STRONG><A NAME="item_B%3A%3ADebug">B::Debug</A></STRONG><BR>
  230. <DD>
  231. Walk Perl syntax tree, printing debug info about ops
  232. <P></P>
  233. <DT><STRONG><A NAME="item_B%3A%3ADeparse">B::Deparse</A></STRONG><BR>
  234. <DD>
  235. Perl compiler backend to produce Perl code
  236. <P></P>
  237. <DT><STRONG><A NAME="item_B%3A%3ADisassembler">B::Disassembler</A></STRONG><BR>
  238. <DD>
  239. Disassemble Perl bytecode
  240. <P></P>
  241. <DT><STRONG><A NAME="item_B%3A%3ALint">B::Lint</A></STRONG><BR>
  242. <DD>
  243. Module to catch dubious constructs
  244. <P></P>
  245. <DT><STRONG><A NAME="item_B%3A%3AShowlex">B::Showlex</A></STRONG><BR>
  246. <DD>
  247. Show lexical variables used in functions or files
  248. <P></P>
  249. <DT><STRONG><A NAME="item_B%3A%3AStackobj">B::Stackobj</A></STRONG><BR>
  250. <DD>
  251. Helper module for CC backend
  252. <P>B::Stash -- XXX NFI XXX</P>
  253. <P></P>
  254. <DT><STRONG><A NAME="item_B%3A%3ATerse">B::Terse</A></STRONG><BR>
  255. <DD>
  256. Walk Perl syntax tree, printing terse info about ops
  257. <P></P>
  258. <DT><STRONG><A NAME="item_B%3A%3AXref">B::Xref</A></STRONG><BR>
  259. <DD>
  260. Generates cross reference reports for Perl programs
  261. <P></P>
  262. <DT><STRONG><A NAME="item_Benchmark">Benchmark</A></STRONG><BR>
  263. <DD>
  264. Benchmark running times of code
  265. <P></P>
  266. <DT><STRONG><A NAME="item_ByteLoader">ByteLoader</A></STRONG><BR>
  267. <DD>
  268. Load byte-compiled Perl code
  269. <P></P>
  270. <DT><STRONG><A NAME="item_CGI">CGI</A></STRONG><BR>
  271. <DD>
  272. Simple Common Gateway Interface class
  273. <P></P>
  274. <DT><STRONG><A NAME="item_CGI%3A%3AApache">CGI::Apache</A></STRONG><BR>
  275. <DD>
  276. Make things work with CGI.pm against Perl-Apache API
  277. <P></P>
  278. <DT><STRONG><A NAME="item_CGI%3A%3ACarp">CGI::Carp</A></STRONG><BR>
  279. <DD>
  280. CGI routines for writing to the HTTPD (or other) error log
  281. <P></P>
  282. <DT><STRONG><A NAME="item_CGI%3A%3ACookie">CGI::Cookie</A></STRONG><BR>
  283. <DD>
  284. Interface to Netscape Cookies
  285. <P></P>
  286. <DT><STRONG><A NAME="item_CGI%3A%3AFast">CGI::Fast</A></STRONG><BR>
  287. <DD>
  288. CGI Interface for Fast CGI
  289. <P></P>
  290. <DT><STRONG><A NAME="item_CGI%3A%3APretty">CGI::Pretty</A></STRONG><BR>
  291. <DD>
  292. Module to produce nicely formatted HTML code
  293. <P></P>
  294. <DT><STRONG><A NAME="item_CGI%3A%3APush">CGI::Push</A></STRONG><BR>
  295. <DD>
  296. Simple Interface to Server Push
  297. <P></P>
  298. <DT><STRONG><A NAME="item_CGI%3A%3ASwitch">CGI::Switch</A></STRONG><BR>
  299. <DD>
  300. Try more than one constructors and return the first object available
  301. <P></P>
  302. <DT><STRONG><A NAME="item_CPAN">CPAN</A></STRONG><BR>
  303. <DD>
  304. Query, download, and build Perl modules from CPAN sites
  305. <P></P>
  306. <DT><STRONG><A NAME="item_CPAN%3A%3AFirstTime">CPAN::FirstTime</A></STRONG><BR>
  307. <DD>
  308. Utility for CPAN::Config file initialization
  309. <P></P>
  310. <DT><STRONG><A NAME="item_CPAN%3A%3ANox">CPAN::Nox</A></STRONG><BR>
  311. <DD>
  312. Wrapper around CPAN.pm without using any XS module
  313. <P></P>
  314. <DT><STRONG><A NAME="item_Carp">Carp</A></STRONG><BR>
  315. <DD>
  316. Act like warn/die from perspective of caller
  317. <P></P>
  318. <DT><STRONG><A NAME="item_Carp%3A%3AHeavy">Carp::Heavy</A></STRONG><BR>
  319. <DD>
  320. Carp guts
  321. <P></P>
  322. <DT><STRONG><A NAME="item_Class%3A%3AStruct">Class::Struct</A></STRONG><BR>
  323. <DD>
  324. Declare struct-like datatypes as Perl classes
  325. <P></P>
  326. <DT><STRONG><A NAME="item_Config">Config</A></STRONG><BR>
  327. <DD>
  328. Access Perl configuration information
  329. <P></P>
  330. <DT><STRONG><A NAME="item_Cwd">Cwd</A></STRONG><BR>
  331. <DD>
  332. Get pathname of current working directory
  333. <P></P>
  334. <DT><STRONG><A NAME="item_DB">DB</A></STRONG><BR>
  335. <DD>
  336. Programmatic interface to the Perl debugging API (experimental)
  337. <P></P>
  338. <DT><STRONG><A NAME="item_DB_File">DB_File</A></STRONG><BR>
  339. <DD>
  340. Perl5 access to Berkeley DB version 1.x
  341. <P></P>
  342. <DT><STRONG><A NAME="item_Data%3A%3ADumper">Data::Dumper</A></STRONG><BR>
  343. <DD>
  344. Serialize Perl data structures
  345. <P></P>
  346. <DT><STRONG><A NAME="item_Devel%3A%3ADProf">Devel::DProf</A></STRONG><BR>
  347. <DD>
  348. A Perl execution profiler
  349. <P></P>
  350. <DT><STRONG><A NAME="item_Devel%3A%3APeek">Devel::Peek</A></STRONG><BR>
  351. <DD>
  352. A data debugging tool for the XS programmer
  353. <P></P>
  354. <DT><STRONG><A NAME="item_Devel%3A%3ASelfStubber">Devel::SelfStubber</A></STRONG><BR>
  355. <DD>
  356. Generate stubs for a SelfLoading module
  357. <P></P>
  358. <DT><STRONG><A NAME="item_DirHandle">DirHandle</A></STRONG><BR>
  359. <DD>
  360. Supply object methods for directory handles
  361. <P></P>
  362. <DT><STRONG><A NAME="item_Dumpvalue">Dumpvalue</A></STRONG><BR>
  363. <DD>
  364. Provide screen dump of Perl data
  365. <P></P>
  366. <DT><STRONG><A NAME="item_DynaLoader">DynaLoader</A></STRONG><BR>
  367. <DD>
  368. Dynamically load C libraries into Perl code
  369. <P></P>
  370. <DT><STRONG><A NAME="item_English">English</A></STRONG><BR>
  371. <DD>
  372. Use English (or awk) names for ugly punctuation variables
  373. <P></P>
  374. <DT><STRONG><A NAME="item_Env">Env</A></STRONG><BR>
  375. <DD>
  376. Access environment variables as regular ones
  377. <P></P>
  378. <DT><STRONG><A NAME="item_Errno">Errno</A></STRONG><BR>
  379. <DD>
  380. Load the libc errno.h defines
  381. <P></P>
  382. <DT><STRONG><A NAME="item_Exporter">Exporter</A></STRONG><BR>
  383. <DD>
  384. Implement default import method for modules
  385. <P></P>
  386. <DT><STRONG><A NAME="item_Exporter%3A%3AHeavy">Exporter::Heavy</A></STRONG><BR>
  387. <DD>
  388. Exporter guts
  389. <P></P>
  390. <DT><STRONG><A NAME="item_ExtUtils%3A%3ACommand">ExtUtils::Command</A></STRONG><BR>
  391. <DD>
  392. Utilities to replace common Unix commands in Makefiles etc.
  393. <P></P>
  394. <DT><STRONG><A NAME="item_ExtUtils%3A%3AEmbed">ExtUtils::Embed</A></STRONG><BR>
  395. <DD>
  396. Utilities for embedding Perl in C/C++ programs
  397. <P></P>
  398. <DT><STRONG><A NAME="item_ExtUtils%3A%3AInstall">ExtUtils::Install</A></STRONG><BR>
  399. <DD>
  400. Install files from here to there
  401. <P></P>
  402. <DT><STRONG><A NAME="item_ExtUtils%3A%3AInstalled">ExtUtils::Installed</A></STRONG><BR>
  403. <DD>
  404. Inventory management of installed modules
  405. <P></P>
  406. <DT><STRONG><A NAME="item_ExtUtils%3A%3ALiblist">ExtUtils::Liblist</A></STRONG><BR>
  407. <DD>
  408. Determine libraries to use and how to use them
  409. <P></P>
  410. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMM_Cygwin">ExtUtils::MM_Cygwin</A></STRONG><BR>
  411. <DD>
  412. Methods to override Unix behavior in ExtUtils::MakeMaker
  413. <P></P>
  414. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMM_OS2">ExtUtils::MM_OS2</A></STRONG><BR>
  415. <DD>
  416. Methods to override Unix behavior in ExtUtils::MakeMaker
  417. <P></P>
  418. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMM_Unix">ExtUtils::MM_Unix</A></STRONG><BR>
  419. <DD>
  420. Methods used by ExtUtils::MakeMaker
  421. <P></P>
  422. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMM_VMS">ExtUtils::MM_VMS</A></STRONG><BR>
  423. <DD>
  424. Methods to override Unix behavior in ExtUtils::MakeMaker
  425. <P></P>
  426. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMM_Win32">ExtUtils::MM_Win32</A></STRONG><BR>
  427. <DD>
  428. Methods to override Unix behavior in ExtUtils::MakeMaker
  429. <P></P>
  430. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMakeMaker">ExtUtils::MakeMaker</A></STRONG><BR>
  431. <DD>
  432. Create an extension Makefile
  433. <P></P>
  434. <DT><STRONG><A NAME="item_ExtUtils%3A%3AManifest">ExtUtils::Manifest</A></STRONG><BR>
  435. <DD>
  436. Utilities to write and check a MANIFEST file
  437. <P>ExtUtils::Miniperl, writemain - Write the C code for perlmain.c</P>
  438. <P></P>
  439. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMkbootstrap">ExtUtils::Mkbootstrap</A></STRONG><BR>
  440. <DD>
  441. Make a bootstrap file for use by DynaLoader
  442. <P></P>
  443. <DT><STRONG><A NAME="item_ExtUtils%3A%3AMksymlists">ExtUtils::Mksymlists</A></STRONG><BR>
  444. <DD>
  445. Write linker options files for dynamic extension
  446. <P></P>
  447. <DT><STRONG><A NAME="item_ExtUtils%3A%3APacklist">ExtUtils::Packlist</A></STRONG><BR>
  448. <DD>
  449. Manage .packlist files
  450. <P></P>
  451. <DT><STRONG><A NAME="item_ExtUtils%3A%3Atestlib">ExtUtils::testlib</A></STRONG><BR>
  452. <DD>
  453. Add blib/* directories to @INC
  454. <P></P>
  455. <DT><STRONG><A NAME="item_Fatal">Fatal</A></STRONG><BR>
  456. <DD>
  457. Replace functions with equivalents which succeed or die
  458. <P></P>
  459. <DT><STRONG><A NAME="item_Fcntl">Fcntl</A></STRONG><BR>
  460. <DD>
  461. Load the libc fcntl.h defines
  462. <P></P>
  463. <DT><STRONG><A NAME="item_File%3A%3ABasename">File::Basename</A></STRONG><BR>
  464. <DD>
  465. Split a pathname into pieces
  466. <P></P>
  467. <DT><STRONG><A NAME="item_File%3A%3ACheckTree">File::CheckTree</A></STRONG><BR>
  468. <DD>
  469. Run many filetest checks on a tree
  470. <P></P>
  471. <DT><STRONG><A NAME="item_File%3A%3ACompare">File::Compare</A></STRONG><BR>
  472. <DD>
  473. Compare files or filehandles
  474. <P></P>
  475. <DT><STRONG><A NAME="item_File%3A%3ACopy">File::Copy</A></STRONG><BR>
  476. <DD>
  477. Copy files or filehandles
  478. <P></P>
  479. <DT><STRONG><A NAME="item_File%3A%3ADosGlob">File::DosGlob</A></STRONG><BR>
  480. <DD>
  481. DOS-like globbing and then some
  482. <P></P>
  483. <DT><STRONG><A NAME="item_File%3A%3AFind">File::Find</A></STRONG><BR>
  484. <DD>
  485. Traverse a file tree
  486. <P></P>
  487. <DT><STRONG><A NAME="item_File%3A%3AGlob">File::Glob</A></STRONG><BR>
  488. <DD>
  489. Perl extension for BSD filename globbing
  490. <P></P>
  491. <DT><STRONG><A NAME="item_File%3A%3APath">File::Path</A></STRONG><BR>
  492. <DD>
  493. Create or remove a series of directories
  494. <P></P>
  495. <DT><STRONG><A NAME="item_File%3A%3ASpec">File::Spec</A></STRONG><BR>
  496. <DD>
  497. Portably perform operations on file names
  498. <P></P>
  499. <DT><STRONG><A NAME="item_File%3A%3ASpec%3A%3AFunctions">File::Spec::Functions</A></STRONG><BR>
  500. <DD>
  501. Portably perform operations on file names
  502. <P></P>
  503. <DT><STRONG><A NAME="item_File%3A%3ASpec%3A%3AMac">File::Spec::Mac</A></STRONG><BR>
  504. <DD>
  505. File::Spec for MacOS
  506. <P></P>
  507. <DT><STRONG><A NAME="item_File%3A%3ASpec%3A%3AOS2">File::Spec::OS2</A></STRONG><BR>
  508. <DD>
  509. Methods for OS/2 file specs
  510. <P></P>
  511. <DT><STRONG><A NAME="item_File%3A%3ASpec%3A%3AUnix">File::Spec::Unix</A></STRONG><BR>
  512. <DD>
  513. Methods used by File::Spec
  514. <P></P>
  515. <DT><STRONG><A NAME="item_File%3A%3ASpec%3A%3AVMS">File::Spec::VMS</A></STRONG><BR>
  516. <DD>
  517. Methods for VMS file specs
  518. <P></P>
  519. <DT><STRONG><A NAME="item_File%3A%3ASpec%3A%3AWin32">File::Spec::Win32</A></STRONG><BR>
  520. <DD>
  521. Methods for Win32 file specs
  522. <P></P>
  523. <DT><STRONG><A NAME="item_File%3A%3Astat">File::stat</A></STRONG><BR>
  524. <DD>
  525. By-name interface to Perl's built-in <A HREF="../../lib/Pod/perlfunc.html#item_stat"><CODE>stat()</CODE></A> functions
  526. <P></P>
  527. <DT><STRONG><A NAME="item_FileCache">FileCache</A></STRONG><BR>
  528. <DD>
  529. Keep more files open than the system permits
  530. <P></P>
  531. <DT><STRONG><A NAME="item_FileHandle">FileHandle</A></STRONG><BR>
  532. <DD>
  533. Supply object methods for filehandles
  534. <P></P>
  535. <DT><STRONG><A NAME="item_FindBin">FindBin</A></STRONG><BR>
  536. <DD>
  537. Locate installation directory of running Perl program
  538. <P></P>
  539. <DT><STRONG><A NAME="item_GDBM_File">GDBM_File</A></STRONG><BR>
  540. <DD>
  541. Access to the gdbm library
  542. <P></P>
  543. <DT><STRONG><A NAME="item_Getopt%3A%3ALong">Getopt::Long</A></STRONG><BR>
  544. <DD>
  545. Extended processing of command line options
  546. <P></P>
  547. <DT><STRONG><A NAME="item_Getopt%3A%3AStd">Getopt::Std</A></STRONG><BR>
  548. <DD>
  549. Process single-character switches with switch clustering
  550. <P></P>
  551. <DT><STRONG><A NAME="item_I18N%3A%3ACollate">I18N::Collate</A></STRONG><BR>
  552. <DD>
  553. Compare 8-bit scalar data according to current locale
  554. <P></P>
  555. <DT><STRONG><A NAME="item_IO">IO</A></STRONG><BR>
  556. <DD>
  557. Front-end to load various IO modules
  558. <P></P>
  559. <DT><STRONG><A NAME="item_IO%3A%3ADir">IO::Dir</A></STRONG><BR>
  560. <DD>
  561. Supply object methods for directory handles
  562. <P></P>
  563. <DT><STRONG><A NAME="item_IO%3A%3AFile">IO::File</A></STRONG><BR>
  564. <DD>
  565. Supply object methods for filehandles
  566. <P></P>
  567. <DT><STRONG><A NAME="item_IO%3A%3AHandle">IO::Handle</A></STRONG><BR>
  568. <DD>
  569. Supply object methods for I/O handles
  570. <P></P>
  571. <DT><STRONG><A NAME="item_IO%3A%3APipe">IO::Pipe</A></STRONG><BR>
  572. <DD>
  573. Supply object methods for pipes
  574. <P></P>
  575. <DT><STRONG><A NAME="item_IO%3A%3APoll">IO::Poll</A></STRONG><BR>
  576. <DD>
  577. Object interface to system poll call
  578. <P></P>
  579. <DT><STRONG><A NAME="item_IO%3A%3ASeekable">IO::Seekable</A></STRONG><BR>
  580. <DD>
  581. Supply seek based methods for I/O objects
  582. <P></P>
  583. <DT><STRONG><A NAME="item_IO%3A%3ASelect">IO::Select</A></STRONG><BR>
  584. <DD>
  585. OO interface to the select system call
  586. <P></P>
  587. <DT><STRONG><A NAME="item_IO%3A%3ASocket">IO::Socket</A></STRONG><BR>
  588. <DD>
  589. Object interface to socket communications
  590. <P></P>
  591. <DT><STRONG><A NAME="item_IO%3A%3ASocket%3A%3AINET">IO::Socket::INET</A></STRONG><BR>
  592. <DD>
  593. Object interface for AF_INET domain sockets
  594. <P></P>
  595. <DT><STRONG><A NAME="item_IO%3A%3ASocket%3A%3AUNIX">IO::Socket::UNIX</A></STRONG><BR>
  596. <DD>
  597. Object interface for AF_UNIX domain sockets
  598. <P></P>
  599. <DT><STRONG><A NAME="item_IPC%3A%3AMsg">IPC::Msg</A></STRONG><BR>
  600. <DD>
  601. SysV Msg IPC object class
  602. <P></P>
  603. <DT><STRONG><A NAME="item_IPC%3A%3AOpen2">IPC::Open2</A></STRONG><BR>
  604. <DD>
  605. Open a process for both reading and writing
  606. <P></P>
  607. <DT><STRONG><A NAME="item_IPC%3A%3AOpen3">IPC::Open3</A></STRONG><BR>
  608. <DD>
  609. Open a process for reading, writing, and error handling
  610. <P></P>
  611. <DT><STRONG><A NAME="item_IPC%3A%3ASemaphore">IPC::Semaphore</A></STRONG><BR>
  612. <DD>
  613. SysV Semaphore IPC object class
  614. <P></P>
  615. <DT><STRONG><A NAME="item_IPC%3A%3ASysV">IPC::SysV</A></STRONG><BR>
  616. <DD>
  617. SysV IPC constants
  618. <P></P>
  619. <DT><STRONG><A NAME="item_Math%3A%3ABigFloat">Math::BigFloat</A></STRONG><BR>
  620. <DD>
  621. Arbitrary length float math package
  622. <P></P>
  623. <DT><STRONG><A NAME="item_Math%3A%3ABigInt">Math::BigInt</A></STRONG><BR>
  624. <DD>
  625. Arbitrary size integer math package
  626. <P></P>
  627. <DT><STRONG><A NAME="item_Math%3A%3AComplex">Math::Complex</A></STRONG><BR>
  628. <DD>
  629. Complex numbers and associated mathematical functions
  630. <P></P>
  631. <DT><STRONG><A NAME="item_Math%3A%3ATrig">Math::Trig</A></STRONG><BR>
  632. <DD>
  633. Trigonometric functions
  634. <P></P>
  635. <DT><STRONG><A NAME="item_Net%3A%3APing">Net::Ping</A></STRONG><BR>
  636. <DD>
  637. Check a remote host for reachability
  638. <P></P>
  639. <DT><STRONG><A NAME="item_Net%3A%3Ahostent">Net::hostent</A></STRONG><BR>
  640. <DD>
  641. By-name interface to Perl's built-in gethost*() functions
  642. <P></P>
  643. <DT><STRONG><A NAME="item_Net%3A%3Anetent">Net::netent</A></STRONG><BR>
  644. <DD>
  645. By-name interface to Perl's built-in getnet*() functions
  646. <P></P>
  647. <DT><STRONG><A NAME="item_Net%3A%3Aprotoent">Net::protoent</A></STRONG><BR>
  648. <DD>
  649. By-name interface to Perl's built-in getproto*() functions
  650. <P></P>
  651. <DT><STRONG><A NAME="item_Net%3A%3Aservent">Net::servent</A></STRONG><BR>
  652. <DD>
  653. By-name interface to Perl's built-in getserv*() functions
  654. <P></P>
  655. <DT><STRONG><A NAME="item_O">O</A></STRONG><BR>
  656. <DD>
  657. Generic interface to Perl Compiler backends
  658. <P></P>
  659. <DT><STRONG><A NAME="item_Opcode">Opcode</A></STRONG><BR>
  660. <DD>
  661. Disable named opcodes when compiling Perl code
  662. <P></P>
  663. <DT><STRONG><A NAME="item_POSIX">POSIX</A></STRONG><BR>
  664. <DD>
  665. Perl interface to IEEE Std 1003.1
  666. <P></P>
  667. <DT><STRONG><A NAME="item_Pod%3A%3AChecker">Pod::Checker</A></STRONG><BR>
  668. <DD>
  669. Check pod documents for syntax errors
  670. <P></P>
  671. <DT><STRONG><A NAME="item_Pod%3A%3AHtml">Pod::Html</A></STRONG><BR>
  672. <DD>
  673. Module to convert pod files to HTML
  674. <P></P>
  675. <DT><STRONG><A NAME="item_Pod%3A%3AInputObjects">Pod::InputObjects</A></STRONG><BR>
  676. <DD>
  677. Manage POD objects
  678. <P></P>
  679. <DT><STRONG><A NAME="item_Pod%3A%3AMan">Pod::Man</A></STRONG><BR>
  680. <DD>
  681. Convert POD data to formatted *roff input
  682. <P></P>
  683. <DT><STRONG><A NAME="item_Pod%3A%3AParser">Pod::Parser</A></STRONG><BR>
  684. <DD>
  685. Base class for creating POD filters and translators
  686. <P></P>
  687. <DT><STRONG><A NAME="item_Pod%3A%3ASelect">Pod::Select</A></STRONG><BR>
  688. <DD>
  689. Extract selected sections of POD from input
  690. <P></P>
  691. <DT><STRONG><A NAME="item_Pod%3A%3AText">Pod::Text</A></STRONG><BR>
  692. <DD>
  693. Convert POD data to formatted ASCII text
  694. <P></P>
  695. <DT><STRONG><A NAME="item_Pod%3A%3AText%3A%3AColor">Pod::Text::Color</A></STRONG><BR>
  696. <DD>
  697. Convert POD data to formatted color ASCII text
  698. <P></P>
  699. <DT><STRONG><A NAME="item_Pod%3A%3AUsage">Pod::Usage</A></STRONG><BR>
  700. <DD>
  701. Print a usage message from embedded pod documentation
  702. <P></P>
  703. <DT><STRONG><A NAME="item_SDBM_File">SDBM_File</A></STRONG><BR>
  704. <DD>
  705. Tied access to sdbm files
  706. <P></P>
  707. <DT><STRONG><A NAME="item_Safe">Safe</A></STRONG><BR>
  708. <DD>
  709. Compile and execute code in restricted compartments
  710. <P></P>
  711. <DT><STRONG><A NAME="item_Search%3A%3ADict">Search::Dict</A></STRONG><BR>
  712. <DD>
  713. Search for key in dictionary file
  714. <P></P>
  715. <DT><STRONG><A NAME="item_SelectSaver">SelectSaver</A></STRONG><BR>
  716. <DD>
  717. Save and restore selected file handle
  718. <P></P>
  719. <DT><STRONG><A NAME="item_SelfLoader">SelfLoader</A></STRONG><BR>
  720. <DD>
  721. Load functions only on demand
  722. <P></P>
  723. <DT><STRONG><A NAME="item_Shell">Shell</A></STRONG><BR>
  724. <DD>
  725. Run shell commands transparently within Perl
  726. <P></P>
  727. <DT><STRONG><A NAME="item_Socket">Socket</A></STRONG><BR>
  728. <DD>
  729. Load the libc socket.h defines and structure manipulators
  730. <P></P>
  731. <DT><STRONG><A NAME="item_Symbol">Symbol</A></STRONG><BR>
  732. <DD>
  733. Manipulate Perl symbols and their names
  734. <P></P>
  735. <DT><STRONG><A NAME="item_Sys%3A%3AHostname">Sys::Hostname</A></STRONG><BR>
  736. <DD>
  737. Try every conceivable way to get hostname
  738. <P></P>
  739. <DT><STRONG><A NAME="item_Sys%3A%3ASyslog">Sys::Syslog</A></STRONG><BR>
  740. <DD>
  741. Interface to the libc <CODE>syslog(3)</CODE> calls
  742. <P></P>
  743. <DT><STRONG><A NAME="item_Term%3A%3ACap">Term::Cap</A></STRONG><BR>
  744. <DD>
  745. Termcap interface
  746. <P></P>
  747. <DT><STRONG><A NAME="item_Term%3A%3AComplete">Term::Complete</A></STRONG><BR>
  748. <DD>
  749. Word completion module
  750. <P></P>
  751. <DT><STRONG><A NAME="item_Term%3A%3AReadLine">Term::ReadLine</A></STRONG><BR>
  752. <DD>
  753. Interface to various `readline' packages.
  754. <P></P>
  755. <DT><STRONG><A NAME="item_Test">Test</A></STRONG><BR>
  756. <DD>
  757. Provides a simple framework for writing test scripts
  758. <P></P>
  759. <DT><STRONG><A NAME="item_Test%3A%3AHarness">Test::Harness</A></STRONG><BR>
  760. <DD>
  761. Run Perl standard test scripts with statistics
  762. <P></P>
  763. <DT><STRONG><A NAME="item_Text%3A%3AAbbrev">Text::Abbrev</A></STRONG><BR>
  764. <DD>
  765. Create an abbreviation table from a list
  766. <P></P>
  767. <DT><STRONG><A NAME="item_Text%3A%3AParseWords">Text::ParseWords</A></STRONG><BR>
  768. <DD>
  769. Parse text into a list of tokens or array of arrays
  770. <P></P>
  771. <DT><STRONG><A NAME="item_Text%3A%3ASoundex">Text::Soundex</A></STRONG><BR>
  772. <DD>
  773. Implementation of the Soundex Algorithm as described by Knuth
  774. <P>Text::Tabs -- expand and unexpand tabs per <CODE>expand(1)</CODE> and <CODE>unexpand(1)</CODE></P>
  775. <P></P>
  776. <DT><STRONG><A NAME="item_Text%3A%3AWrap">Text::Wrap</A></STRONG><BR>
  777. <DD>
  778. Line wrapping to form simple paragraphs
  779. <P></P>
  780. <DT><STRONG><A NAME="item_Tie%3A%3AArray">Tie::Array</A></STRONG><BR>
  781. <DD>
  782. Base class for tied arrays
  783. <P></P>
  784. <DT><STRONG><A NAME="item_Tie%3A%3AHandle">Tie::Handle</A></STRONG><BR>
  785. <DD>
  786. Base class definitions for tied handles
  787. <P></P>
  788. <DT><STRONG><A NAME="item_Tie%3A%3AHash">Tie::Hash</A></STRONG><BR>
  789. <DD>
  790. Base class definitions for tied hashes
  791. <P></P>
  792. <DT><STRONG><A NAME="item_Tie%3A%3ARefHash">Tie::RefHash</A></STRONG><BR>
  793. <DD>
  794. Use references as hash keys
  795. <P></P>
  796. <DT><STRONG><A NAME="item_Tie%3A%3AScalar">Tie::Scalar</A></STRONG><BR>
  797. <DD>
  798. Base class definitions for tied scalars
  799. <P></P>
  800. <DT><STRONG><A NAME="item_Tie%3A%3ASubstrHash">Tie::SubstrHash</A></STRONG><BR>
  801. <DD>
  802. Fixed-table-size, fixed-key-length hashing
  803. <P></P>
  804. <DT><STRONG><A NAME="item_Time%3A%3ALocal">Time::Local</A></STRONG><BR>
  805. <DD>
  806. Efficiently compute time from local and GMT time
  807. <P></P>
  808. <DT><STRONG><A NAME="item_Time%3A%3Agmtime">Time::gmtime</A></STRONG><BR>
  809. <DD>
  810. By-name interface to Perl's built-in <A HREF="../../lib/Pod/perlfunc.html#item_gmtime"><CODE>gmtime()</CODE></A> function
  811. <P></P>
  812. <DT><STRONG><A NAME="item_Time%3A%3Alocaltime">Time::localtime</A></STRONG><BR>
  813. <DD>
  814. By-name interface to Perl's built-in <A HREF="../../lib/Pod/perlfunc.html#item_localtime"><CODE>localtime()</CODE></A> function
  815. <P></P>
  816. <DT><STRONG><A NAME="item_Time%3A%3Atm">Time::tm</A></STRONG><BR>
  817. <DD>
  818. Internal object used by Time::gmtime and Time::localtime
  819. <P></P>
  820. <DT><STRONG><A NAME="item_UNIVERSAL">UNIVERSAL</A></STRONG><BR>
  821. <DD>
  822. Base class for ALL classes (blessed references)
  823. <P></P>
  824. <DT><STRONG><A NAME="item_User%3A%3Agrent">User::grent</A></STRONG><BR>
  825. <DD>
  826. By-name interface to Perl's built-in getgr*() functions
  827. <P></P>
  828. <DT><STRONG><A NAME="item_User%3A%3Apwent">User::pwent</A></STRONG><BR>
  829. <DD>
  830. By-name interface to Perl's built-in getpw*() functions
  831. <P></P></DL>
  832. <P>To find out <EM>all</EM> modules installed on your system, including
  833. those without documentation or outside the standard release, 
  834. just do this:</P>
  835. <PRE>
  836.     % find `perl -e 'print "@INC"'` -name '*.pm' -print</PRE>
  837. <P>To get a log of all module distributions which have been installed
  838. since perl was installed, just do:</P>
  839. <PRE>
  840.     % perldoc <A HREF="../../lib/perllocal.html">perllocal</A></PRE>
  841. <P>Modules should all have their own documentation installed and accessible
  842. via your system <CODE>man(1)</CODE> command, or via the <CODE>perldoc</CODE> program.  If you do
  843. not have a <STRONG>find</STRONG>
  844. program, you can use the Perl <STRONG>find2perl</STRONG> program instead, which
  845. generates Perl code as output you can run through perl.  If you
  846. have a <STRONG>man</STRONG> program but it doesn't find your modules, you'll have
  847. to fix your manpath.  See <A HREF="../../lib/Pod/perl.html">the perl manpage</A> for details.</P>
  848. <P>
  849. <H2><A NAME="extension modules">Extension Modules</A></H2>
  850. <P>Extension modules are written in C (or a mix of Perl and C).  They
  851. are usually dynamically loaded into Perl if and when you need them,
  852. but may also be be linked in statically.  Supported extension modules
  853. include Socket, Fcntl, and POSIX.</P>
  854. <P>Many popular C extension modules do not come bundled (at least, not
  855. completely) due to their sizes, volatility, or simply lack of time
  856. for adequate testing and configuration across the multitude of
  857. platforms on which Perl was beta-tested.  You are encouraged to
  858. look for them on CPAN (described below), or using web search engines
  859. like Alta Vista or Deja News.</P>
  860. <P>
  861. <HR>
  862. <H1><A NAME="cpan">CPAN</A></H1>
  863. <P>CPAN stands for Comprehensive Perl Archive Network; it's a globally
  864. replicated trove of Perl materials, including documentation, style
  865. guides, tricks and trap, alternate ports to non-Unix systems and
  866. occasional binary distributions for these.   Search engines for
  867. CPAN can be found at <A HREF="http://cpan.perl.com/">http://cpan.perl.com/</A> and at
  868. <A HREF="http://theory.uwinnipeg.ca/mod_perl/cpan-search.pl">http://theory.uwinnipeg.ca/mod_perl/cpan-search.pl</A> .</P>
  869. <P>Most importantly, CPAN includes around a thousand unbundled modules,
  870. some of which require a C compiler to build.  Major categories of
  871. modules are:</P>
  872. <UL>
  873. <LI><STRONG><A NAME="item_Language_Extensions_and_Documentation_Tools">Language Extensions and Documentation Tools</A></STRONG><BR>
  874.  
  875. <LI><STRONG><A NAME="item_Development_Support">Development Support</A></STRONG><BR>
  876.  
  877. <LI><STRONG><A NAME="item_Operating_System_Interfaces">Operating System Interfaces</A></STRONG><BR>
  878.  
  879. <LI><STRONG><A NAME="item_Control">Networking, Device Control (modems) and InterProcess Communication</A></STRONG><BR>
  880.  
  881. <LI><STRONG><A NAME="item_Data_Types_and_Data_Type_Utilities">Data Types and Data Type Utilities</A></STRONG><BR>
  882.  
  883. <LI><STRONG><A NAME="item_Database_Interfaces">Database Interfaces</A></STRONG><BR>
  884.  
  885. <LI><STRONG><A NAME="item_User_Interfaces">User Interfaces</A></STRONG><BR>
  886.  
  887. <LI><STRONG><A NAME="item_Interfaces_to_%2F_Emulations_of_Other_Programming_">Interfaces to / Emulations of Other Programming Languages</A></STRONG><BR>
  888.  
  889. <LI><STRONG><A NAME="item_Locking">File Names, File Systems and File Locking (see also File Handles)</A></STRONG><BR>
  890.  
  891. <LI><STRONG><A NAME="item_String_Processing%2C_Language_Text_Processing%2C_P">String Processing, Language Text Processing, Parsing, and Searching</A></STRONG><BR>
  892.  
  893. <LI><STRONG><A NAME="item_Option%2C_Argument%2C_Parameter%2C_and_Configurati">Option, Argument, Parameter, and Configuration File Processing</A></STRONG><BR>
  894.  
  895. <LI><STRONG><A NAME="item_Internationalization_and_Locale">Internationalization and Locale</A></STRONG><BR>
  896.  
  897. <LI><STRONG><A NAME="item_Authentication%2C_Security%2C_and_Encryption">Authentication, Security, and Encryption</A></STRONG><BR>
  898.  
  899. <LI><STRONG><A NAME="item_World_Wide_Web%2C_HTML%2C_HTTP%2C_CGI%2C_MIME">World Wide Web, HTML, HTTP, CGI, MIME</A></STRONG><BR>
  900.  
  901. <LI><STRONG><A NAME="item_Server_and_Daemon_Utilities">Server and Daemon Utilities</A></STRONG><BR>
  902.  
  903. <LI><STRONG><A NAME="item_Archiving_and_Compression">Archiving and Compression</A></STRONG><BR>
  904.  
  905. <LI><STRONG><A NAME="item_Images%2C_Pixmap_and_Bitmap_Manipulation%2C_Drawin">Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing</A></STRONG><BR>
  906.  
  907. <LI><STRONG><A NAME="item_Mail_and_Usenet_News">Mail and Usenet News</A></STRONG><BR>
  908.  
  909. <LI><STRONG><A NAME="item_Utilities">Control Flow Utilities (callbacks and exceptions etc)</A></STRONG><BR>
  910.  
  911. <LI><STRONG><A NAME="item_File_Handle_and_Input%2FOutput_Stream_Utilities">File Handle and Input/Output Stream Utilities</A></STRONG><BR>
  912.  
  913. <LI><STRONG><A NAME="item_Miscellaneous_Modules">Miscellaneous Modules</A></STRONG><BR>
  914.  
  915. </UL>
  916. <P>Registered CPAN sites as of this writing include the following.
  917. You should try to choose one close to you:</P>
  918. <DL>
  919. <DT><STRONG><A NAME="item_Africa">Africa</A></STRONG><BR>
  920. <DD>
  921. <PRE>
  922.     South Africa   <A HREF="ftp://ftp.is.co.za/programming/perl/CPAN/">ftp://ftp.is.co.za/programming/perl/CPAN/</A>
  923.                    <A HREF="ftp://ftp.saix.net/pub/CPAN/">ftp://ftp.saix.net/pub/CPAN/</A>
  924.                    <A HREF="ftp://ftp.sun.ac.za/CPAN/">ftp://ftp.sun.ac.za/CPAN/</A>
  925.                    <A HREF="ftp://ftpza.co.za/pub/mirrors/cpan/">ftp://ftpza.co.za/pub/mirrors/cpan/</A></PRE>
  926. <DT><STRONG><A NAME="item_Asia">Asia</A></STRONG><BR>
  927. <DD>
  928. <PRE>
  929.     China          <A HREF="ftp://freesoft.cei.gov.cn/pub/languages/perl/CPAN/">ftp://freesoft.cei.gov.cn/pub/languages/perl/CPAN/</A>
  930.     Hong Kong      <A HREF="ftp://ftp.pacific.net.hk/pub/mirror/CPAN/">ftp://ftp.pacific.net.hk/pub/mirror/CPAN/</A>
  931.     Indonesia      <A HREF="ftp://malone.piksi.itb.ac.id/pub/CPAN/">ftp://malone.piksi.itb.ac.id/pub/CPAN/</A>
  932.     Israel         <A HREF="ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/">ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/</A>
  933.     Japan          <A HREF="ftp://ftp.dti.ad.jp/pub/lang/CPAN/">ftp://ftp.dti.ad.jp/pub/lang/CPAN/</A>
  934.                    <A HREF="ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/">ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/</A>
  935.                    <A HREF="ftp://ftp.lab.kdd.co.jp/lang/perl/CPAN/">ftp://ftp.lab.kdd.co.jp/lang/perl/CPAN/</A>
  936.                    <A HREF="ftp://ftp.meisei-u.ac.jp/pub/CPAN/">ftp://ftp.meisei-u.ac.jp/pub/CPAN/</A>
  937.                    <A HREF="ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/">ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/</A>
  938.                    <A HREF="ftp://mirror.nucba.ac.jp/mirror/Perl/">ftp://mirror.nucba.ac.jp/mirror/Perl/</A>
  939.     Saudi-Arabia   <A HREF="ftp://ftp.isu.net.sa/pub/CPAN/">ftp://ftp.isu.net.sa/pub/CPAN/</A>
  940.     Singapore      <A HREF="ftp://ftp.nus.edu.sg/pub/unix/perl/CPAN/">ftp://ftp.nus.edu.sg/pub/unix/perl/CPAN/</A>
  941.     South Korea    <A HREF="ftp://ftp.bora.net/pub/CPAN/">ftp://ftp.bora.net/pub/CPAN/</A>
  942.                    <A HREF="ftp://ftp.kornet.net/pub/CPAN/">ftp://ftp.kornet.net/pub/CPAN/</A>
  943.                    <A HREF="ftp://ftp.nuri.net/pub/CPAN/">ftp://ftp.nuri.net/pub/CPAN/</A>
  944.     Taiwan         <A HREF="ftp://coda.nctu.edu.tw/computer-languages/perl/CPAN/">ftp://coda.nctu.edu.tw/computer-languages/perl/CPAN/</A>
  945.                    <A HREF="ftp://ftp.ee.ncku.edu.tw/pub3/perl/CPAN/">ftp://ftp.ee.ncku.edu.tw/pub3/perl/CPAN/</A>
  946.                    <A HREF="ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/">ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/</A>
  947.     Thailand       <A HREF="ftp://ftp.nectec.or.th/pub/mirrors/CPAN/">ftp://ftp.nectec.or.th/pub/mirrors/CPAN/</A></PRE>
  948. <DT><STRONG><A NAME="item_Australasia">Australasia</A></STRONG><BR>
  949. <DD>
  950. <PRE>
  951.     Australia      <A HREF="ftp://cpan.topend.com.au/pub/CPAN/">ftp://cpan.topend.com.au/pub/CPAN/</A>
  952.                    <A HREF="ftp://ftp.labyrinth.net.au/pub/perl-CPAN/">ftp://ftp.labyrinth.net.au/pub/perl-CPAN/</A>
  953.                    <A HREF="ftp://ftp.sage-au.org.au/pub/compilers/perl/CPAN/">ftp://ftp.sage-au.org.au/pub/compilers/perl/CPAN/</A>
  954.                    <A HREF="ftp://mirror.aarnet.edu.au/pub/perl/CPAN/">ftp://mirror.aarnet.edu.au/pub/perl/CPAN/</A>
  955.     New Zealand    <A HREF="ftp://ftp.auckland.ac.nz/pub/perl/CPAN/">ftp://ftp.auckland.ac.nz/pub/perl/CPAN/</A>
  956.                    <A HREF="ftp://sunsite.net.nz/pub/languages/perl/CPAN/">ftp://sunsite.net.nz/pub/languages/perl/CPAN/</A></PRE>
  957. <DT><STRONG><A NAME="item_Central_America">Central America</A></STRONG><BR>
  958. <DD>
  959. <PRE>
  960.     Costa Rica     <A HREF="ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/">ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/</A></PRE>
  961. <DT><STRONG><A NAME="item_Europe">Europe</A></STRONG><BR>
  962. <DD>
  963. <PRE>
  964.     Austria        <A HREF="ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN/">ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN/</A>
  965.     Belgium        <A HREF="ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/">ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/</A>
  966.     Bulgaria       <A HREF="ftp://ftp.ntrl.net/pub/mirrors/CPAN/">ftp://ftp.ntrl.net/pub/mirrors/CPAN/</A>
  967.     Croatia        <A HREF="ftp://ftp.linux.hr/pub/CPAN/">ftp://ftp.linux.hr/pub/CPAN/</A>
  968.     Czech Republic <A HREF="ftp://ftp.fi.muni.cz/pub/perl/">ftp://ftp.fi.muni.cz/pub/perl/</A>
  969.                    <A HREF="ftp://sunsite.mff.cuni.cz/Languages/Perl/CPAN/">ftp://sunsite.mff.cuni.cz/Languages/Perl/CPAN/</A>
  970.     Denmark        <A HREF="ftp://sunsite.auc.dk/pub/languages/perl/CPAN/">ftp://sunsite.auc.dk/pub/languages/perl/CPAN/</A>
  971.     Estonia        <A HREF="ftp://ftp.ut.ee/pub/languages/perl/CPAN/">ftp://ftp.ut.ee/pub/languages/perl/CPAN/</A>
  972.     Finland        <A HREF="ftp://ftp.funet.fi/pub/languages/perl/CPAN/">ftp://ftp.funet.fi/pub/languages/perl/CPAN/</A>
  973.     France         <A HREF="ftp://ftp.grolier.fr/pub/perl/CPAN/">ftp://ftp.grolier.fr/pub/perl/CPAN/</A>
  974.                    <A HREF="ftp://ftp.lip6.fr/pub/perl/CPAN/">ftp://ftp.lip6.fr/pub/perl/CPAN/</A>
  975.                    <A HREF="ftp://ftp.oleane.net/pub/mirrors/CPAN/">ftp://ftp.oleane.net/pub/mirrors/CPAN/</A>
  976.                    <A HREF="ftp://ftp.pasteur.fr/pub/computing/CPAN/">ftp://ftp.pasteur.fr/pub/computing/CPAN/</A>
  977.                    <A HREF="ftp://ftp.uvsq.fr/pub/perl/CPAN/">ftp://ftp.uvsq.fr/pub/perl/CPAN/</A>
  978.     German         <A HREF="ftp://ftp.gigabell.net/pub/CPAN/">ftp://ftp.gigabell.net/pub/CPAN/</A>
  979.     Germany        <A HREF="ftp://ftp.archive.de.uu.net/pub/CPAN/">ftp://ftp.archive.de.uu.net/pub/CPAN/</A>
  980.                    <A HREF="ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/">ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/</A>
  981.                    <A HREF="ftp://ftp.gmd.de/packages/CPAN/">ftp://ftp.gmd.de/packages/CPAN/</A>
  982.                    <A HREF="ftp://ftp.gwdg.de/pub/languages/perl/CPAN/">ftp://ftp.gwdg.de/pub/languages/perl/CPAN/</A>
  983.                    <A HREF="ftp://ftp.leo.org/pub/comp/general/programming/languages/script/perl/CPAN/">ftp://ftp.leo.org/pub/comp/general/programming/languages/script/perl/CPAN/</A>
  984.                    <A HREF="ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/">ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/</A>
  985.                    <A HREF="ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/">ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/</A>
  986.                    <A HREF="ftp://ftp.uni-erlangen.de/pub/source/CPAN/">ftp://ftp.uni-erlangen.de/pub/source/CPAN/</A>
  987.                    <A HREF="ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/">ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/</A>
  988.     Germany        <A HREF="ftp://ftp.archive.de.uu.net/pub/CPAN/">ftp://ftp.archive.de.uu.net/pub/CPAN/</A>
  989.                    <A HREF="ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/">ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/</A>
  990.                    <A HREF="ftp://ftp.gmd.de/packages/CPAN/">ftp://ftp.gmd.de/packages/CPAN/</A>
  991.                    <A HREF="ftp://ftp.gwdg.de/pub/languages/perl/CPAN/">ftp://ftp.gwdg.de/pub/languages/perl/CPAN/</A>
  992.                    <A HREF="ftp://ftp.leo.org/pub/comp/general/programming/languages/script/perl/CPAN/">ftp://ftp.leo.org/pub/comp/general/programming/languages/script/perl/CPAN/</A>
  993.                    <A HREF="ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/">ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/</A>
  994.                    <A HREF="ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/">ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/</A>
  995.                    <A HREF="ftp://ftp.uni-erlangen.de/pub/source/CPAN/">ftp://ftp.uni-erlangen.de/pub/source/CPAN/</A>
  996.                    <A HREF="ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/">ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/</A>
  997.     Greece         <A HREF="ftp://ftp.ntua.gr/pub/lang/perl/">ftp://ftp.ntua.gr/pub/lang/perl/</A>
  998.     Hungary        <A HREF="ftp://ftp.kfki.hu/pub/packages/perl/CPAN/">ftp://ftp.kfki.hu/pub/packages/perl/CPAN/</A>
  999.     Iceland        <A HREF="ftp://ftp.gm.is/pub/CPAN/">ftp://ftp.gm.is/pub/CPAN/</A>
  1000.     Ireland        <A HREF="ftp://cpan.indigo.ie/pub/CPAN/">ftp://cpan.indigo.ie/pub/CPAN/</A>
  1001.                    <A HREF="ftp://sunsite.compapp.dcu.ie/pub/perl/">ftp://sunsite.compapp.dcu.ie/pub/perl/</A>
  1002.     Italy          <A HREF="ftp://cis.uniRoma2.it/CPAN/">ftp://cis.uniRoma2.it/CPAN/</A>
  1003.                    <A HREF="ftp://ftp.flashnet.it/pub/CPAN/">ftp://ftp.flashnet.it/pub/CPAN/</A>
  1004.                    <A HREF="ftp://ftp.unina.it/pub/Other/CPAN/">ftp://ftp.unina.it/pub/Other/CPAN/</A>
  1005.                    <A HREF="ftp://ftp.unipi.it/pub/mirror/perl/CPAN/">ftp://ftp.unipi.it/pub/mirror/perl/CPAN/</A>
  1006.     Netherlands    <A HREF="ftp://ftp.cs.uu.nl/mirror/CPAN/">ftp://ftp.cs.uu.nl/mirror/CPAN/</A>
  1007.                    <A HREF="ftp://ftp.nluug.nl/pub/languages/perl/CPAN/">ftp://ftp.nluug.nl/pub/languages/perl/CPAN/</A>
  1008.     Norway         <A HREF="ftp://ftp.uit.no/pub/languages/perl/cpan/">ftp://ftp.uit.no/pub/languages/perl/cpan/</A>
  1009.                    <A HREF="ftp://sunsite.uio.no/pub/languages/perl/CPAN/">ftp://sunsite.uio.no/pub/languages/perl/CPAN/</A>
  1010.     Poland         <A HREF="ftp://ftp.man.torun.pl/pub/CPAN/">ftp://ftp.man.torun.pl/pub/CPAN/</A>
  1011.                    <A HREF="ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/">ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/</A>
  1012.                    <A HREF="ftp://sunsite.icm.edu.pl/pub/CPAN/">ftp://sunsite.icm.edu.pl/pub/CPAN/</A>
  1013.     Portugal       <A HREF="ftp://ftp.ci.uminho.pt/pub/mirrors/cpan/">ftp://ftp.ci.uminho.pt/pub/mirrors/cpan/</A>
  1014.                    <A HREF="ftp://ftp.ist.utl.pt/pub/CPAN/">ftp://ftp.ist.utl.pt/pub/CPAN/</A>
  1015.                    <A HREF="ftp://ftp.ua.pt/pub/CPAN/">ftp://ftp.ua.pt/pub/CPAN/</A>
  1016.     Romania        <A HREF="ftp://ftp.dnttm.ro/pub/CPAN/">ftp://ftp.dnttm.ro/pub/CPAN/</A>
  1017.     Russia         <A HREF="ftp://ftp.chg.ru/pub/lang/perl/CPAN/">ftp://ftp.chg.ru/pub/lang/perl/CPAN/</A>
  1018.                    <A HREF="ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/">ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/</A>
  1019.     Slovakia       <A HREF="ftp://ftp.entry.sk/pub/languages/perl/CPAN/">ftp://ftp.entry.sk/pub/languages/perl/CPAN/</A>
  1020.     Slovenia       <A HREF="ftp://ftp.arnes.si/software/perl/CPAN/">ftp://ftp.arnes.si/software/perl/CPAN/</A>
  1021.     Spain          <A HREF="ftp://ftp.etse.urv.es/pub/perl/">ftp://ftp.etse.urv.es/pub/perl/</A>
  1022.                    <A HREF="ftp://ftp.rediris.es/mirror/CPAN/">ftp://ftp.rediris.es/mirror/CPAN/</A>
  1023.     Sweden         <A HREF="ftp://ftp.sunet.se/pub/lang/perl/CPAN/">ftp://ftp.sunet.se/pub/lang/perl/CPAN/</A>
  1024.     Switzerland    <A HREF="ftp://sunsite.cnlab-switch.ch/mirror/CPAN/">ftp://sunsite.cnlab-switch.ch/mirror/CPAN/</A>
  1025.     Turkey         <A HREF="ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/">ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/</A>
  1026.     United Kingdom <A HREF="ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/">ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/</A>
  1027.                    <A HREF="ftp://ftp.flirble.org/pub/languages/perl/CPAN/">ftp://ftp.flirble.org/pub/languages/perl/CPAN/</A>
  1028.                    <A HREF="ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/">ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/</A>
  1029.                    <A HREF="ftp://ftp.plig.org/pub/CPAN/">ftp://ftp.plig.org/pub/CPAN/</A>
  1030.                    <A HREF="ftp://sunsite.doc.ic.ac.uk/packages/CPAN/">ftp://sunsite.doc.ic.ac.uk/packages/CPAN/</A></PRE>
  1031. <DT><STRONG><A NAME="item_North_America">North America</A></STRONG><BR>
  1032. <DD>
  1033. <PRE>
  1034.     Alberta        <A HREF="ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/">ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/</A>
  1035.     California     <A HREF="ftp://cpan.nas.nasa.gov/pub/perl/CPAN/">ftp://cpan.nas.nasa.gov/pub/perl/CPAN/</A>
  1036.                    <A HREF="ftp://cpan.valueclick.com/CPAN/">ftp://cpan.valueclick.com/CPAN/</A>
  1037.                    <A HREF="ftp://ftp.cdrom.com/pub/perl/CPAN/">ftp://ftp.cdrom.com/pub/perl/CPAN/</A>
  1038.                    <A HREF="http://download.sourceforge.net/mirrors/CPAN/">http://download.sourceforge.net/mirrors/CPAN/</A>
  1039.     Colorado       <A HREF="ftp://ftp.cs.colorado.edu/pub/perl/CPAN/">ftp://ftp.cs.colorado.edu/pub/perl/CPAN/</A>
  1040.     Florida        <A HREF="ftp://ftp.cise.ufl.edu/pub/perl/CPAN/">ftp://ftp.cise.ufl.edu/pub/perl/CPAN/</A>
  1041.     Georgia        <A HREF="ftp://ftp.twoguys.org/CPAN/">ftp://ftp.twoguys.org/CPAN/</A>
  1042.     Illinois       <A HREF="ftp://uiarchive.uiuc.edu/pub/lang/perl/CPAN/">ftp://uiarchive.uiuc.edu/pub/lang/perl/CPAN/</A>
  1043.     Indiana        <A HREF="ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN/">ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN/</A>
  1044.                    <A HREF="ftp://ftp.uwsg.indiana.edu/pub/perl/CPAN/">ftp://ftp.uwsg.indiana.edu/pub/perl/CPAN/</A>
  1045.     Kentucky       <A HREF="ftp://ftp.uky.edu/CPAN/">ftp://ftp.uky.edu/CPAN/</A>
  1046.     Manitoba       <A HREF="ftp://theoryx5.uwinnipeg.ca/pub/CPAN/">ftp://theoryx5.uwinnipeg.ca/pub/CPAN/</A>
  1047.     Massachusetts  <A HREF="ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/">ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/</A>
  1048.                    <A HREF="ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/">ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/</A>
  1049.     Mexico         <A HREF="ftp://ftp.msg.com.mx/pub/CPAN/">ftp://ftp.msg.com.mx/pub/CPAN/</A>
  1050.     New York       <A HREF="ftp://ftp.deao.net/pub/CPAN/">ftp://ftp.deao.net/pub/CPAN/</A>
  1051.                    <A HREF="ftp://ftp.rge.com/pub/languages/perl/">ftp://ftp.rge.com/pub/languages/perl/</A>
  1052.     North Carolina <A HREF="ftp://ftp.duke.edu/pub/perl/">ftp://ftp.duke.edu/pub/perl/</A>
  1053.     Nova Scotia    <A HREF="ftp://cpan.chebucto.ns.ca/pub/CPAN/">ftp://cpan.chebucto.ns.ca/pub/CPAN/</A>
  1054.     Oklahoma       <A HREF="ftp://ftp.ou.edu/mirrors/CPAN/">ftp://ftp.ou.edu/mirrors/CPAN/</A>
  1055.     Ontario        <A HREF="ftp://ftp.crc.ca/pub/packages/lang/perl/CPAN/">ftp://ftp.crc.ca/pub/packages/lang/perl/CPAN/</A>
  1056.     Oregon         <A HREF="ftp://ftp.orst.edu/pub/packages/CPAN/">ftp://ftp.orst.edu/pub/packages/CPAN/</A>
  1057.     Pennsylvania   <A HREF="ftp://ftp.epix.net/pub/languages/perl/">ftp://ftp.epix.net/pub/languages/perl/</A>
  1058.     Tennessee      <A HREF="ftp://ftp.sunsite.utk.edu/pub/CPAN/">ftp://ftp.sunsite.utk.edu/pub/CPAN/</A>
  1059.     Texas          <A HREF="ftp://ftp.sedl.org/pub/mirrors/CPAN/">ftp://ftp.sedl.org/pub/mirrors/CPAN/</A>
  1060.                    <A HREF="ftp://jhcloos.com/pub/mirror/CPAN/">ftp://jhcloos.com/pub/mirror/CPAN/</A>
  1061.     Utah           <A HREF="ftp://mirror.xmission.com/CPAN/">ftp://mirror.xmission.com/CPAN/</A>
  1062.     Virginia       <A HREF="ftp://ftp.perl.org/pub/perl/CPAN/">ftp://ftp.perl.org/pub/perl/CPAN/</A>
  1063.                    <A HREF="ftp://ruff.cs.jmu.edu/pub/CPAN/">ftp://ruff.cs.jmu.edu/pub/CPAN/</A>
  1064.     Washington     <A HREF="ftp://ftp-mirror.internap.com/pub/CPAN/">ftp://ftp-mirror.internap.com/pub/CPAN/</A>
  1065.                    <A HREF="ftp://ftp.llarian.net/pub/CPAN/">ftp://ftp.llarian.net/pub/CPAN/</A>
  1066.                    <A HREF="ftp://ftp.spu.edu/pub/CPAN/">ftp://ftp.spu.edu/pub/CPAN/</A></PRE>
  1067. <DT><STRONG><A NAME="item_South_America">South America</A></STRONG><BR>
  1068. <DD>
  1069. <PRE>
  1070.     Brazil         <A HREF="ftp://cpan.if.usp.br/pub/mirror/CPAN/">ftp://cpan.if.usp.br/pub/mirror/CPAN/</A>
  1071.                    <A HREF="ftp://ftp.matrix.com.br/pub/perl/">ftp://ftp.matrix.com.br/pub/perl/</A>
  1072.     Chile          <A HREF="ftp://sunsite.dcc.uchile.cl/pub/Lang/PERL/">ftp://sunsite.dcc.uchile.cl/pub/Lang/PERL/</A></PRE>
  1073. </DL>
  1074. <P>For an up-to-date listing of CPAN sites,
  1075. see <A HREF="http://www.perl.com/perl/CPAN/SITES">http://www.perl.com/perl/CPAN/SITES</A> or <A HREF="ftp://www.perl.com/CPAN/SITES">ftp://www.perl.com/CPAN/SITES</A> .</P>
  1076. <P>
  1077. <HR>
  1078. <H1><A NAME="modules: creation, use, and abuse">Modules: Creation, Use, and Abuse</A></H1>
  1079. <P>(The following section is borrowed directly from Tim Bunce's modules
  1080. file, available at your nearest CPAN site.)</P>
  1081. <P>Perl implements a class using a package, but the presence of a
  1082. package doesn't imply the presence of a class.  A package is just a
  1083. namespace.  A class is a package that provides subroutines that can be
  1084. used as methods.  A method is just a subroutine that expects, as its
  1085. first argument, either the name of a package (for ``static'' methods),
  1086. or a reference to something (for ``virtual'' methods).</P>
  1087. <P>A module is a file that (by convention) provides a class of the same
  1088. name (sans the .pm), plus an import method in that class that can be
  1089. called to fetch exported symbols.  This module may implement some of
  1090. its methods by loading dynamic C or C++ objects, but that should be
  1091. totally transparent to the user of the module.  Likewise, the module
  1092. might set up an AUTOLOAD function to slurp in subroutine definitions on
  1093. demand, but this is also transparent.  Only the <EM>.pm</EM> file is required to
  1094. exist.  See <A HREF="../../lib/Pod/perlsub.html">the perlsub manpage</A>, <A HREF="../../lib/Pod/perltoot.html">the perltoot manpage</A>, and <A HREF="../../lib/AutoLoader.html">the AutoLoader manpage</A> for details about 
  1095. the AUTOLOAD mechanism.</P>
  1096. <P>
  1097. <H2><A NAME="guidelines for module creation">Guidelines for Module Creation</A></H2>
  1098. <DL>
  1099. <DT><STRONG><A NAME="item_Do_similar_modules_already_exist_in_some_form%3F">Do similar modules already exist in some form?</A></STRONG><BR>
  1100. <DD>
  1101. If so, please try to reuse the existing modules either in whole or
  1102. by inheriting useful features into a new class.  If this is not
  1103. practical try to get together with the module authors to work on
  1104. extending or enhancing the functionality of the existing modules.
  1105. A perfect example is the plethora of packages in perl4 for dealing
  1106. with command line options.
  1107. <P>If you are writing a module to expand an already existing set of
  1108. modules, please coordinate with the author of the package.  It
  1109. helps if you follow the same naming scheme and module interaction
  1110. scheme as the original author.</P>
  1111. <P></P>
  1112. <DT><STRONG><A NAME="item_Try_to_design_the_new_module_to_be_easy_to_extend_">Try to design the new module to be easy to extend and reuse.</A></STRONG><BR>
  1113. <DD>
  1114. Try to <CODE>use warnings;</CODE> (or <A HREF="../../lib/Pod/perlfunc.html#item_qw"><CODE>use warnings qw(...);</CODE></A>).
  1115. Remember that you can add <A HREF="../../lib/Pod/perlfunc.html#item_qw"><CODE>no warnings qw(...);</CODE></A> to individual blocks
  1116. of code that need less warnings.
  1117. <P>Use blessed references.  Use the two argument form of bless to bless
  1118. into the class name given as the first parameter of the constructor,
  1119. e.g.,:</P>
  1120. <PRE>
  1121.  sub new {
  1122.         my $class = shift;
  1123.         return bless {}, $class;
  1124.  }</PRE>
  1125. <P>or even this if you'd like it to be used as either a static
  1126. or a virtual method.</P>
  1127. <PRE>
  1128.  sub new {
  1129.         my $self  = shift;
  1130.         my $class = ref($self) || $self;
  1131.         return bless {}, $class;
  1132.  }</PRE>
  1133. <P>Pass arrays as references so more parameters can be added later
  1134. (it's also faster).  Convert functions into methods where
  1135. appropriate.  Split large methods into smaller more flexible ones.
  1136. Inherit methods from other modules if appropriate.</P>
  1137. <P>Avoid class name tests like: <CODE>die "Invalid" unless ref $ref eq 'FOO'</CODE>.
  1138. Generally you can delete the <CODE>eq 'FOO'</CODE> part with no harm at all.
  1139. Let the objects look after themselves! Generally, avoid hard-wired
  1140. class names as far as possible.</P>
  1141. <P>Avoid <CODE>$r->Class::func()</CODE> where using <A HREF="../../lib/Pod/perlfunc.html#item_qw"><CODE>@ISA=qw(... Class ...)</CODE></A> and
  1142. <CODE>$r->func()</CODE> would work (see <A HREF="../../lib/Pod/perlbot.html">the perlbot manpage</A> for more details).</P>
  1143. <P>Use autosplit so little used or newly added functions won't be a
  1144. burden to programs that don't use them. Add test functions to
  1145. the module after __END__ either using AutoSplit or by saying:</P>
  1146. <PRE>
  1147.  eval join('',<main::DATA>) || die $@ unless caller();</PRE>
  1148. <P>Does your module pass the 'empty subclass' test? If you say
  1149. <A HREF="../../lib/Pod/perlfunc.html#item_qw"><CODE>@SUBCLASS::ISA = qw(YOURCLASS);</CODE></A> your applications should be able
  1150. to use SUBCLASS in exactly the same way as YOURCLASS.  For example,
  1151. does your application still work if you change:  <CODE>$obj = new YOURCLASS;</CODE>
  1152. into: <CODE>$obj = new SUBCLASS;</CODE> ?</P>
  1153. <P>Avoid keeping any state information in your packages. It makes it
  1154. difficult for multiple other packages to use yours. Keep state
  1155. information in objects.</P>
  1156. <P>Always use <STRONG>-w</STRONG>.</P>
  1157. <P>Try to <CODE>use strict;</CODE> (or <A HREF="../../lib/Pod/perlfunc.html#item_qw"><CODE>use strict qw(...);</CODE></A>).
  1158. Remember that you can add <A HREF="../../lib/Pod/perlfunc.html#item_qw"><CODE>no strict qw(...);</CODE></A> to individual blocks
  1159. of code that need less strictness.</P>
  1160. <P>Always use <STRONG>-w</STRONG>.</P>
  1161. <P>Follow the guidelines in the <CODE>perlstyle(1)</CODE> manual.</P>
  1162. <P>Always use <STRONG>-w</STRONG>.</P>
  1163. <P></P>
  1164. <DT><STRONG><A NAME="item_Some_simple_style_guidelines">Some simple style guidelines</A></STRONG><BR>
  1165. <DD>
  1166. The perlstyle manual supplied with Perl has many helpful points.
  1167. <P>Coding style is a matter of personal taste. Many people evolve their
  1168. style over several years as they learn what helps them write and
  1169. maintain good code.  Here's one set of assorted suggestions that
  1170. seem to be widely used by experienced developers:</P>
  1171. <P>Use underscores to separate words.  It is generally easier to read
  1172. $var_names_like_this than $VarNamesLikeThis, especially for
  1173. non-native speakers of English. It's also a simple rule that works
  1174. consistently with VAR_NAMES_LIKE_THIS.</P>
  1175. <P>Package/Module names are an exception to this rule. Perl informally
  1176. reserves lowercase module names for 'pragma' modules like integer
  1177. and strict. Other modules normally begin with a capital letter and
  1178. use mixed case with no underscores (need to be short and portable).</P>
  1179. <P>You may find it helpful to use letter case to indicate the scope
  1180. or nature of a variable. For example:</P>
  1181. <PRE>
  1182.  $ALL_CAPS_HERE   constants only (beware clashes with Perl vars)
  1183.  $Some_Caps_Here  package-wide global/static
  1184.  $no_caps_here    function scope my() or local() variables</PRE>
  1185. <P>Function and method names seem to work best as all lowercase.
  1186. e.g., <CODE>$obj->as_string()</CODE>.</P>
  1187. <P>You can use a leading underscore to indicate that a variable or
  1188. function should not be used outside the package that defined it.</P>
  1189. <P></P>
  1190. <DT><STRONG><A NAME="item_Select_what_to_export%2E">Select what to export.</A></STRONG><BR>
  1191. <DD>
  1192. Do NOT export method names!
  1193. <P>Do NOT export anything else by default without a good reason!</P>
  1194. <P>Exports pollute the namespace of the module user.  If you must
  1195. export try to use @EXPORT_OK in preference to @EXPORT and avoid
  1196. short or common names to reduce the risk of name clashes.</P>
  1197. <P>Generally anything not exported is still accessible from outside the
  1198. module using the ModuleName::item_name (or <CODE>$blessed_ref->method</CODE>)
  1199. syntax.  By convention you can use a leading underscore on names to
  1200. indicate informally that they are 'internal' and not for public use.</P>
  1201. <P>(It is actually possible to get private functions by saying:
  1202. <CODE>my $subref = sub { ... };  &$subref;</CODE>.  But there's no way to call that
  1203. directly as a method, because a method must have a name in the symbol
  1204. table.)</P>
  1205. <P>As a general rule, if the module is trying to be object oriented
  1206. then export nothing. If it's just a collection of functions then
  1207. @EXPORT_OK anything but use @EXPORT with caution.</P>
  1208. <P></P>
  1209. <DT><STRONG><A NAME="item_Select_a_name_for_the_module%2E">Select a name for the module.</A></STRONG><BR>
  1210. <DD>
  1211. This name should be as descriptive, accurate, and complete as
  1212. possible.  Avoid any risk of ambiguity. Always try to use two or
  1213. more whole words.  Generally the name should reflect what is special
  1214. about what the module does rather than how it does it.  Please use
  1215. nested module names to group informally or categorize a module.
  1216. There should be a very good reason for a module not to have a nested name.
  1217. Module names should begin with a capital letter.
  1218. <P>Having 57 modules all called Sort will not make life easy for anyone
  1219. (though having 23 called Sort::Quick is only marginally better :-).
  1220. Imagine someone trying to install your module alongside many others.
  1221. If in any doubt ask for suggestions in comp.lang.perl.misc.</P>
  1222. <P>If you are developing a suite of related modules/classes it's good
  1223. practice to use nested classes with a common prefix as this will
  1224. avoid namespace clashes. For example: Xyz::Control, Xyz::View,
  1225. Xyz::Model etc. Use the modules in this list as a naming guide.</P>
  1226. <P>If adding a new module to a set, follow the original author's
  1227. standards for naming modules and the interface to methods in
  1228. those modules.</P>
  1229. <P>To be portable each component of a module name should be limited to
  1230. 11 characters. If it might be used on MS-DOS then try to ensure each is
  1231. unique in the first 8 characters. Nested modules make this easier.</P>
  1232. <P></P>
  1233. <DT><STRONG><A NAME="item_Have_you_got_it_right%3F">Have you got it right?</A></STRONG><BR>
  1234. <DD>
  1235. How do you know that you've made the right decisions? Have you
  1236. picked an interface design that will cause problems later? Have
  1237. you picked the most appropriate name? Do you have any questions?
  1238. <P>The best way to know for sure, and pick up many helpful suggestions,
  1239. is to ask someone who knows. Comp.lang.perl.misc is read by just about
  1240. all the people who develop modules and it's the best place to ask.</P>
  1241. <P>All you need to do is post a short summary of the module, its
  1242. purpose and interfaces. A few lines on each of the main methods is
  1243. probably enough. (If you post the whole module it might be ignored
  1244. by busy people - generally the very people you want to read it!)</P>
  1245. <P>Don't worry about posting if you can't say when the module will be
  1246. ready - just say so in the message. It might be worth inviting
  1247. others to help you, they may be able to complete it for you!</P>
  1248. <P></P>
  1249. <DT><STRONG><A NAME="item_README_and_other_Additional_Files%2E">README and other Additional Files.</A></STRONG><BR>
  1250. <DD>
  1251. It's well known that software developers usually fully document the
  1252. software they write. If, however, the world is in urgent need of
  1253. your software and there is not enough time to write the full
  1254. documentation please at least provide a README file containing:
  1255. <UL>
  1256. <LI><STRONG><A NAME="item_A_description_of_the_module%2Fpackage%2Fextension_">A description of the module/package/extension etc.</A></STRONG><BR>
  1257.  
  1258. <LI><STRONG><A NAME="item_A_copyright_notice_%2D_see_below%2E">A copyright notice - see below.</A></STRONG><BR>
  1259.  
  1260. <LI><STRONG><A NAME="item_Prerequisites_%2D_what_else_you_may_need_to_have%2">Prerequisites - what else you may need to have.</A></STRONG><BR>
  1261.  
  1262. <LI><STRONG><A NAME="item_How_to_build_it_%2D_possible_changes_to_Makefile%2">How to build it - possible changes to Makefile.PL etc.</A></STRONG><BR>
  1263.  
  1264. <LI><STRONG><A NAME="item_How_to_install_it%2E">How to install it.</A></STRONG><BR>
  1265.  
  1266. <LI><STRONG><A NAME="item_Recent_changes_in_this_release%2C_especially_incom">Recent changes in this release, especially incompatibilities</A></STRONG><BR>
  1267.  
  1268. <LI><STRONG><A NAME="item_Changes_%2F_enhancements_you_plan_to_make_in_the_f">Changes / enhancements you plan to make in the future.</A></STRONG><BR>
  1269.  
  1270. </UL>
  1271. <P>If the README file seems to be getting too large you may wish to
  1272. split out some of the sections into separate files: INSTALL,
  1273. Copying, ToDo etc.</P>
  1274. <DL>
  1275. <DT><STRONG><A NAME="item_Adding_a_Copyright_Notice%2E">Adding a Copyright Notice.</A></STRONG><BR>
  1276. <DD>
  1277. How you choose to license your work is a personal decision.
  1278. The general mechanism is to assert your Copyright and then make
  1279. a declaration of how others may copy/use/modify your work.
  1280. <P>Perl, for example, is supplied with two types of licence: The GNU
  1281. GPL and The Artistic Licence (see the files README, Copying, and
  1282. Artistic).  Larry has good reasons for NOT just using the GNU GPL.</P>
  1283. <P>My personal recommendation, out of respect for Larry, Perl, and the
  1284. Perl community at large is to state something simply like:</P>
  1285. <PRE>
  1286.  Copyright (c) 1995 Your Name. All rights reserved.
  1287.  This program is free software; you can redistribute it and/or
  1288.  modify it under the same terms as Perl itself.</PRE>
  1289. <P>This statement should at least appear in the README file. You may
  1290. also wish to include it in a Copying file and your source files.
  1291. Remember to include the other words in addition to the Copyright.</P>
  1292. <P></P>
  1293. <DT><STRONG><A NAME="item_Give_the_module_a_version%2Fissue%2Frelease_number">Give the module a version/issue/release number.</A></STRONG><BR>
  1294. <DD>
  1295. To be fully compatible with the Exporter and MakeMaker modules you
  1296. should store your module's version number in a non-my package
  1297. variable called $VERSION.  This should be a floating point
  1298. number with at least two digits after the decimal (i.e., hundredths,
  1299. e.g, <CODE>$VERSION = "0.01"</CODE>).  Don't use a ``1.3.2'' style version.
  1300. See <A HREF="../../lib/Exporter.html">the Exporter manpage</A> for details.
  1301. <P>It may be handy to add a function or method to retrieve the number.
  1302. Use the number in announcements and archive file names when
  1303. releasing the module (ModuleName-1.02.tar.Z).
  1304. See perldoc ExtUtils::MakeMaker.pm for details.</P>
  1305. <P></P>
  1306. <DT><STRONG><A NAME="item_How_to_release_and_distribute_a_module%2E">How to release and distribute a module.</A></STRONG><BR>
  1307. <DD>
  1308. It's good idea to post an announcement of the availability of your
  1309. module (or the module itself if small) to the comp.lang.perl.announce
  1310. Usenet newsgroup.  This will at least ensure very wide once-off
  1311. distribution.
  1312. <P>If possible, register the module with CPAN.  You should 
  1313. include details of its location in your announcement.</P>
  1314. <P>Some notes about ftp archives: Please use a long descriptive file
  1315. name that includes the version number. Most incoming directories
  1316. will not be readable/listable, i.e., you won't be able to see your
  1317. file after uploading it. Remember to send your email notification
  1318. message as soon as possible after uploading else your file may get
  1319. deleted automatically. Allow time for the file to be processed
  1320. and/or check the file has been processed before announcing its
  1321. location.</P>
  1322. <P>FTP Archives for Perl Modules:</P>
  1323. <P>Follow the instructions and links on:</P>
  1324. <PRE>
  1325.    <A HREF="http://www.perl.com/CPAN/modules/00modlist.long.html">http://www.perl.com/CPAN/modules/00modlist.long.html</A>
  1326.    <A HREF="http://www.perl.com/CPAN/modules/04pause.html">http://www.perl.com/CPAN/modules/04pause.html</A></PRE>
  1327. <P>or upload to one of these sites:</P>
  1328. <PRE>
  1329.    https://pause.kbx.de/pause/
  1330.    <A HREF="http://pause.perl.org/pause/">http://pause.perl.org/pause/</A></PRE>
  1331. <P>and notify <<A HREF="mailto:modules@perl.org">modules@perl.org</A>>.</P>
  1332. <P>By using the WWW interface you can ask the Upload Server to mirror
  1333. your modules from your ftp or WWW site into your own directory on
  1334. CPAN!</P>
  1335. <P>Please remember to send me an updated entry for the Module list!</P>
  1336. <P></P>
  1337. <DT><STRONG><A NAME="item_Take_care_when_changing_a_released_module%2E">Take care when changing a released module.</A></STRONG><BR>
  1338. <DD>
  1339. Always strive to remain compatible with previous released versions.
  1340. Otherwise try to add a mechanism to revert to the
  1341. old behavior if people rely on it.  Document incompatible changes.
  1342. <P></P></DL>
  1343. </DL>
  1344. <P>
  1345. <H2><A NAME="guidelines for converting perl 4 library scripts into modules">Guidelines for Converting Perl 4 Library Scripts into Modules</A></H2>
  1346. <DL>
  1347. <DT><STRONG><A NAME="item_There_is_no_requirement_to_convert_anything%2E">There is no requirement to convert anything.</A></STRONG><BR>
  1348. <DD>
  1349. If it ain't broke, don't fix it! Perl 4 library scripts should
  1350. continue to work with no problems. You may need to make some minor
  1351. changes (like escaping non-array @'s in double quoted strings) but
  1352. there is no need to convert a .pl file into a Module for just that.
  1353. <P></P>
  1354. <DT><STRONG><A NAME="item_Consider_the_implications%2E">Consider the implications.</A></STRONG><BR>
  1355. <DD>
  1356. All Perl applications that make use of the script will need to
  1357. be changed (slightly) if the script is converted into a module.  Is
  1358. it worth it unless you plan to make other changes at the same time?
  1359. <P></P>
  1360. <DT><STRONG><A NAME="item_Make_the_most_of_the_opportunity%2E">Make the most of the opportunity.</A></STRONG><BR>
  1361. <DD>
  1362. If you are going to convert the script to a module you can use the
  1363. opportunity to redesign the interface.  The guidelines for module
  1364. creation above include many of the issues you should consider.
  1365. <P></P>
  1366. <DT><STRONG><A NAME="item_The_pl2pm_utility_will_get_you_started%2E">The pl2pm utility will get you started.</A></STRONG><BR>
  1367. <DD>
  1368. This utility will read *.pl files (given as parameters) and write
  1369. corresponding *.pm files. The pl2pm utilities does the following:
  1370. <UL>
  1371. <LI><STRONG><A NAME="item_Adds_the_standard_Module_prologue_lines">Adds the standard Module prologue lines</A></STRONG><BR>
  1372.  
  1373. <LI><STRONG><A NAME="item_Converts_package_specifiers_from_%27_to_%3A%3A">Converts package specifiers from ' to ::</A></STRONG><BR>
  1374.  
  1375. <LI><STRONG><A NAME="item_die">Converts <CODE>die(...)</CODE> to <CODE>croak(...)</CODE></A></STRONG><BR>
  1376.  
  1377. <LI><STRONG><A NAME="item_Several_other_minor_changes">Several other minor changes</A></STRONG><BR>
  1378.  
  1379. </UL>
  1380. <P>Being a mechanical process pl2pm is not bullet proof. The converted
  1381. code will need careful checking, especially any package statements.
  1382. Don't delete the original .pl file till the new .pm one works!</P>
  1383. </DL>
  1384. <P>
  1385. <H2><A NAME="guidelines for reusing application code">Guidelines for Reusing Application Code</A></H2>
  1386. <DL>
  1387. <DT><STRONG><A NAME="item_Complete_applications_rarely_belong_in_the_Perl_Mo">Complete applications rarely belong in the Perl Module Library.</A></STRONG><BR>
  1388. <DD>
  1389. <DT><STRONG><A NAME="item_Many_applications_contain_some_Perl_code_that_coul">Many applications contain some Perl code that could be reused.</A></STRONG><BR>
  1390. <DD>
  1391. Help save the world! Share your code in a form that makes it easy
  1392. to reuse.
  1393. <P></P>
  1394. <DT><STRONG><A NAME="item_Break%2Dout_the_reusable_code_into_one_or_more_sep">Break-out the reusable code into one or more separate module files.</A></STRONG><BR>
  1395. <DD>
  1396. <DT><STRONG><A NAME="item_Take_the_opportunity_to_reconsider_and_redesign_th">Take the opportunity to reconsider and redesign the interfaces.</A></STRONG><BR>
  1397. <DD>
  1398. <DT><STRONG><A NAME="item_In_some_cases_the_%27application%27_can_then_be_re">In some cases the 'application' can then be reduced to a small</A></STRONG><BR>
  1399. <DD>
  1400. fragment of code built on top of the reusable modules. In these cases
  1401. the application could invoked as:
  1402. <PRE>
  1403.      % perl -e 'use Module::Name; method(@ARGV)' ...
  1404. or
  1405.      % perl -mModule::Name ...    (in perl5.002 or higher)</PRE>
  1406. <P></P></DL>
  1407. <P>
  1408. <HR>
  1409. <H1><A NAME="note">NOTE</A></H1>
  1410. <P>Perl does not enforce private and public parts of its modules as you may
  1411. have been used to in other languages like C++, Ada, or Modula-17.  Perl
  1412. doesn't have an infatuation with enforced privacy.  It would prefer
  1413. that you stayed out of its living room because you weren't invited, not
  1414. because it has a shotgun.</P>
  1415. <P>The module and its user have a contract, part of which is common law,
  1416. and part of which is ``written''.  Part of the common law contract is
  1417. that a module doesn't pollute any namespace it wasn't asked to.  The
  1418. written contract for the module (A.K.A. documentation) may make other
  1419. provisions.  But then you know when you <CODE>use RedefineTheWorld</CODE> that
  1420. you're redefining the world and willing to take the consequences.</P>
  1421. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  1422. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  1423. <STRONG><P CLASS=block> perlmodlib - constructing new Perl modules and finding existing ones</P></STRONG>
  1424. </TD></TR>
  1425. </TABLE>
  1426.  
  1427. </BODY>
  1428.  
  1429. </HTML>
  1430.