Leaked source code of windows server 2003
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.

2042 lines
44 KiB

  1. # Generated by perlmodlib.PL DO NOT EDIT!
  2. =head1 NAME
  3. perlmodlib - constructing new Perl modules and finding existing ones
  4. =head1 DESCRIPTION
  5. =head1 THE PERL MODULE LIBRARY
  6. Many modules are included the Perl distribution. These are described
  7. below, and all end in F<.pm>. You may discover compiled library
  8. file (usually ending in F<.so>) or small pieces of modules to be
  9. autoloaded (ending in F<.al>); these were automatically generated
  10. by the installation process. You may also discover files in the
  11. library directory that end in either F<.pl> or F<.ph>. These are
  12. old libraries supplied so that old programs that use them still
  13. run. The F<.pl> files will all eventually be converted into standard
  14. modules, and the F<.ph> files made by B<h2ph> will probably end up
  15. as extension modules made by B<h2xs>. (Some F<.ph> values may
  16. already be available through the POSIX, Errno, or Fcntl modules.)
  17. The B<pl2pm> file in the distribution may help in your conversion,
  18. but it's just a mechanical process and therefore far from bulletproof.
  19. =head2 Pragmatic Modules
  20. They work somewhat like compiler directives (pragmata) in that they
  21. tend to affect the compilation of your program, and thus will usually
  22. work well only when used within a C<use>, or C<no>. Most of these
  23. are lexically scoped, so an inner BLOCK may countermand them
  24. by saying:
  25. no integer;
  26. no strict 'refs';
  27. no warnings;
  28. which lasts until the end of that BLOCK.
  29. Some pragmas are lexically scoped--typically those that affect the
  30. C<$^H> hints variable. Others affect the current package instead,
  31. like C<use vars> and C<use subs>, which allow you to predeclare a
  32. variables or subroutines within a particular I<file> rather than
  33. just a block. Such declarations are effective for the entire file
  34. for which they were declared. You cannot rescind them with C<no
  35. vars> or C<no subs>.
  36. The following pragmas are defined (and have their own documentation).
  37. =over 12
  38. =item attributes
  39. Get/set subroutine or variable attributes
  40. =item attrs
  41. Set/get attributes of a subroutine (deprecated)
  42. =item autouse
  43. Postpone load of modules until a function is used
  44. =item base
  45. Establish IS-A relationship with base class at compile time
  46. =item blib
  47. Use MakeMaker's uninstalled version of a package
  48. =item bytes
  49. Force byte semantics rather than character semantics
  50. =item charnames
  51. Define character names for C<\N{named}> string literal escape.
  52. =item constant
  53. Declare constants
  54. =item diagnostics
  55. Perl compiler pragma to force verbose warning diagnostics
  56. =item fields
  57. Compile-time class fields
  58. =item filetest
  59. Control the filetest permission operators
  60. =item integer
  61. Use integer arithmetic instead of floating point
  62. =item less
  63. Request less of something from the compiler
  64. =item lib
  65. Manipulate @INC at compile time
  66. =item locale
  67. Use and avoid POSIX locales for built-in operations
  68. =item open
  69. Set default disciplines for input and output
  70. =item ops
  71. Restrict unsafe operations when compiling
  72. =item overload
  73. Package for overloading perl operations
  74. =item re
  75. Alter regular expression behaviour
  76. =item sigtrap
  77. Enable simple signal handling
  78. =item strict
  79. Restrict unsafe constructs
  80. =item subs
  81. Predeclare sub names
  82. =item utf8
  83. Enable/disable UTF-8 in source code
  84. =item vars
  85. Predeclare global variable names (obsolete)
  86. =item warnings
  87. Control optional warnings
  88. =item warnings::register
  89. Warnings import function
  90. =back
  91. =head2 Standard Modules
  92. Standard, bundled modules are all expected to behave in a well-defined
  93. manner with respect to namespace pollution because they use the
  94. Exporter module. See their own documentation for details.
  95. =over 12
  96. =item AnyDBM_File
  97. Provide framework for multiple DBMs
  98. =item AutoLoader
  99. Load subroutines only on demand
  100. =item AutoSplit
  101. Split a package for autoloading
  102. =item B
  103. The Perl Compiler
  104. =item B::Asmdata
  105. Autogenerated data about Perl ops, used to generate bytecode
  106. =item B::Assembler
  107. Assemble Perl bytecode
  108. =item B::Bblock
  109. Walk basic blocks
  110. =item B::Bytecode
  111. Perl compiler's bytecode backend
  112. =item B::C
  113. Perl compiler's C backend
  114. =item B::CC
  115. Perl compiler's optimized C translation backend
  116. =item B::Concise
  117. Walk Perl syntax tree, printing concise info about ops
  118. =item B::Debug
  119. Walk Perl syntax tree, printing debug info about ops
  120. =item B::Deparse
  121. Perl compiler backend to produce perl code
  122. =item B::Disassembler
  123. Disassemble Perl bytecode
  124. =item B::Lint
  125. Perl lint
  126. =item B::Showlex
  127. Show lexical variables used in functions or files
  128. =item B::Stackobj
  129. Helper module for CC backend
  130. =item B::Stash
  131. Show what stashes are loaded
  132. =item B::Terse
  133. Walk Perl syntax tree, printing terse info about ops
  134. =item B::Xref
  135. Generates cross reference reports for Perl programs
  136. =item Benchmark
  137. Benchmark running times of Perl code
  138. =item ByteLoader
  139. Load byte compiled perl code
  140. =item CGI
  141. Simple Common Gateway Interface Class
  142. =item CGI::Apache
  143. Backward compatibility module for CGI.pm
  144. =item CGI::Carp
  145. CGI routines for writing to the HTTPD (or other) error log
  146. =item CGI::Cookie
  147. Interface to Netscape Cookies
  148. =item CGI::Fast
  149. CGI Interface for Fast CGI
  150. =item CGI::Pretty
  151. Module to produce nicely formatted HTML code
  152. =item CGI::Push
  153. Simple Interface to Server Push
  154. =item CGI::Switch
  155. Backward compatibility module for defunct CGI::Switch
  156. =item CGI::Util
  157. Internal utilities used by CGI module
  158. =item CPAN
  159. Query, download and build perl modules from CPAN sites
  160. =item CPAN::FirstTime
  161. Utility for CPAN::Config file Initialization
  162. =item CPAN::Nox
  163. Wrapper around CPAN.pm without using any XS module
  164. =item Carp
  165. Warn of errors (from perspective of caller)
  166. =item Carp::Heavy
  167. Carp guts
  168. =item Class::Struct
  169. Declare struct-like datatypes as Perl classes
  170. =item Cwd
  171. Get pathname of current working directory
  172. =item DB
  173. Programmatic interface to the Perl debugging API (draft, subject to
  174. =item DB_File
  175. Perl5 access to Berkeley DB version 1.x
  176. =item Devel::SelfStubber
  177. Generate stubs for a SelfLoading module
  178. =item DirHandle
  179. Supply object methods for directory handles
  180. =item Dumpvalue
  181. Provides screen dump of Perl data.
  182. =item English
  183. Use nice English (or awk) names for ugly punctuation variables
  184. =item Env
  185. Perl module that imports environment variables as scalars or arrays
  186. =item Exporter
  187. Implements default import method for modules
  188. =item Exporter::Heavy
  189. Exporter guts
  190. =item ExtUtils::Command
  191. Utilities to replace common UNIX commands in Makefiles etc.
  192. =item ExtUtils::Embed
  193. Utilities for embedding Perl in C/C++ applications
  194. =item ExtUtils::Install
  195. Install files from here to there
  196. =item ExtUtils::Installed
  197. Inventory management of installed modules
  198. =item ExtUtils::Liblist
  199. Determine libraries to use and how to use them
  200. =item ExtUtils::MM_Cygwin
  201. Methods to override UN*X behaviour in ExtUtils::MakeMaker
  202. =item ExtUtils::MM_OS2
  203. Methods to override UN*X behaviour in ExtUtils::MakeMaker
  204. =item ExtUtils::MM_Unix
  205. Methods used by ExtUtils::MakeMaker
  206. =item ExtUtils::MM_VMS
  207. Methods to override UN*X behaviour in ExtUtils::MakeMaker
  208. =item ExtUtils::MM_Win32
  209. Methods to override UN*X behaviour in ExtUtils::MakeMaker
  210. =item ExtUtils::MakeMaker
  211. Create an extension Makefile
  212. =item ExtUtils::Manifest
  213. Utilities to write and check a MANIFEST file
  214. =item ExtUtils::Mkbootstrap
  215. Make a bootstrap file for use by DynaLoader
  216. =item ExtUtils::Mksymlists
  217. Write linker options files for dynamic extension
  218. =item ExtUtils::Packlist
  219. Manage .packlist files
  220. =item ExtUtils::testlib
  221. Add blib/* directories to @INC
  222. =item Fatal
  223. Replace functions with equivalents which succeed or die
  224. =item Fcntl
  225. Load the C Fcntl.h defines
  226. =item File::Basename
  227. Split a pathname into pieces
  228. =item File::CheckTree
  229. Run many filetest checks on a tree
  230. =item File::Compare
  231. Compare files or filehandles
  232. =item File::Copy
  233. Copy files or filehandles
  234. =item File::DosGlob
  235. DOS like globbing and then some
  236. =item File::Find
  237. Traverse a file tree
  238. =item File::Path
  239. Create or remove directory trees
  240. =item File::Spec
  241. Portably perform operations on file names
  242. =item File::Spec::Epoc
  243. Methods for Epoc file specs
  244. =item File::Spec::Functions
  245. Portably perform operations on file names
  246. =item File::Spec::Mac
  247. File::Spec for MacOS
  248. =item File::Spec::OS2
  249. Methods for OS/2 file specs
  250. =item File::Spec::Unix
  251. Methods used by File::Spec
  252. =item File::Spec::VMS
  253. Methods for VMS file specs
  254. =item File::Spec::Win32
  255. Methods for Win32 file specs
  256. =item File::Temp
  257. Return name and handle of a temporary file safely
  258. =item File::stat
  259. By-name interface to Perl's built-in stat() functions
  260. =item FileCache
  261. Keep more files open than the system permits
  262. =item FileHandle
  263. Supply object methods for filehandles
  264. =item FindBin
  265. Locate directory of original perl script
  266. =item GDBM_File
  267. Perl5 access to the gdbm library.
  268. =item Getopt::Long
  269. Extended processing of command line options
  270. =item Getopt::Std
  271. Process single-character switches with switch clustering
  272. =item I18N::Collate
  273. Compare 8-bit scalar data according to the current locale
  274. =item IO
  275. Load various IO modules
  276. =item IPC::Open2
  277. Open a process for both reading and writing
  278. =item IPC::Open3
  279. Open a process for reading, writing, and error handling
  280. =item Math::BigFloat
  281. Arbitrary length float math package
  282. =item Math::BigInt
  283. Arbitrary size integer math package
  284. =item Math::Complex
  285. Complex numbers and associated mathematical functions
  286. =item Math::Trig
  287. Trigonometric functions
  288. =item Net::Ping
  289. Check a remote host for reachability
  290. =item Net::hostent
  291. By-name interface to Perl's built-in gethost*() functions
  292. =item Net::netent
  293. By-name interface to Perl's built-in getnet*() functions
  294. =item Net::protoent
  295. By-name interface to Perl's built-in getproto*() functions
  296. =item Net::servent
  297. By-name interface to Perl's built-in getserv*() functions
  298. =item O
  299. Generic interface to Perl Compiler backends
  300. =item Opcode
  301. Disable named opcodes when compiling perl code
  302. =item POSIX
  303. Perl interface to IEEE Std 1003.1
  304. =item Pod::Checker
  305. Check pod documents for syntax errors
  306. =item Pod::Find
  307. Find POD documents in directory trees
  308. =item Pod::Html
  309. Module to convert pod files to HTML
  310. =item Pod::InputObjects
  311. Objects representing POD input paragraphs, commands, etc.
  312. =item Pod::LaTeX
  313. Convert Pod data to formatted Latex
  314. =item Pod::Man
  315. Convert POD data to formatted *roff input
  316. =item Pod::ParseUtils
  317. Helpers for POD parsing and conversion
  318. =item Pod::Parser
  319. Base class for creating POD filters and translators
  320. =item Pod::Plainer
  321. Perl extension for converting Pod to old style Pod.
  322. =item Pod::Select
  323. Extract selected sections of POD from input
  324. =item Pod::Text
  325. Convert POD data to formatted ASCII text
  326. =item Pod::Text::Color
  327. Convert POD data to formatted color ASCII text
  328. =item Pod::Text::Overstrike
  329. Convert POD data to formatted overstrike text
  330. =item Pod::Text::Termcap
  331. Convert POD data to ASCII text with format escapes
  332. =item Pod::Usage
  333. Print a usage message from embedded pod documentation
  334. =item SDBM_File
  335. Tied access to sdbm files
  336. =item Safe
  337. Compile and execute code in restricted compartments
  338. =item Search::Dict
  339. Search for key in dictionary file
  340. =item SelectSaver
  341. Save and restore selected file handle
  342. =item SelfLoader
  343. Load functions only on demand
  344. =item Shell
  345. Run shell commands transparently within perl
  346. =item Socket
  347. Load the C socket.h defines and structure manipulators
  348. =item Symbol
  349. Manipulate Perl symbols and their names
  350. =item Term::ANSIColor
  351. Color screen output using ANSI escape sequences
  352. =item Term::Cap
  353. Perl termcap interface
  354. =item Term::Complete
  355. Perl word completion module
  356. =item Term::ReadLine
  357. Perl interface to various C<readline> packages. If
  358. =item Test
  359. Provides a simple framework for writing test scripts
  360. =item Test::Harness
  361. Run perl standard test scripts with statistics
  362. =item Text::Abbrev
  363. Create an abbreviation table from a list
  364. =item Text::ParseWords
  365. Parse text into an array of tokens or array of arrays
  366. =item Text::Soundex
  367. Implementation of the Soundex Algorithm as Described by Knuth
  368. =item Text::Tabs
  369. Expand and unexpand tabs per the unix expand(1) and unexpand(1)
  370. =item Text::Wrap
  371. Line wrapping to form simple paragraphs
  372. =item Thread
  373. Manipulate threads in Perl (EXPERIMENTAL, subject to change)
  374. =item Thread::Queue
  375. Thread-safe queues
  376. =item Thread::Semaphore
  377. Thread-safe semaphores
  378. =item Thread::Signal
  379. Start a thread which runs signal handlers reliably
  380. =item Thread::Specific
  381. Thread-specific keys
  382. =item Tie::Array
  383. Base class for tied arrays
  384. =item Tie::Handle
  385. Base class definitions for tied handles
  386. =item Tie::Hash
  387. Base class definitions for tied hashes
  388. =item Tie::RefHash
  389. Use references as hash keys
  390. =item Tie::Scalar
  391. Base class definitions for tied scalars
  392. =item Tie::SubstrHash
  393. Fixed-table-size, fixed-key-length hashing
  394. =item Time::Local
  395. Efficiently compute time from local and GMT time
  396. =item Time::gmtime
  397. By-name interface to Perl's built-in gmtime() function
  398. =item Time::localtime
  399. By-name interface to Perl's built-in localtime() function
  400. =item Time::tm
  401. Internal object used by Time::gmtime and Time::localtime
  402. =item UNIVERSAL
  403. Base class for ALL classes (blessed references)
  404. =item User::grent
  405. By-name interface to Perl's built-in getgr*() functions
  406. =item User::pwent
  407. By-name interface to Perl's built-in getpw*() functions
  408. =item Win32
  409. Interfaces to some Win32 API Functions
  410. =back
  411. To find out I<all> modules installed on your system, including
  412. those without documentation or outside the standard release,
  413. just do this:
  414. % find `perl -e 'print "@INC"'` -name '*.pm' -print
  415. They should all have their own documentation installed and accessible
  416. via your system man(1) command. If you do not have a B<find>
  417. program, you can use the Perl B<find2perl> program instead, which
  418. generates Perl code as output you can run through perl. If you
  419. have a B<man> program but it doesn't find your modules, you'll have
  420. to fix your manpath. See L<perl> for details. If you have no
  421. system B<man> command, you might try the B<perldoc> program.
  422. =head2 Extension Modules
  423. Extension modules are written in C (or a mix of Perl and C). They
  424. are usually dynamically loaded into Perl if and when you need them,
  425. but may also be be linked in statically. Supported extension modules
  426. include Socket, Fcntl, and POSIX.
  427. Many popular C extension modules do not come bundled (at least, not
  428. completely) due to their sizes, volatility, or simply lack of time
  429. for adequate testing and configuration across the multitude of
  430. platforms on which Perl was beta-tested. You are encouraged to
  431. look for them on CPAN (described below), or using web search engines
  432. like Alta Vista or Deja News.
  433. =head1 CPAN
  434. CPAN stands for Comprehensive Perl Archive Network; it's a globally
  435. replicated trove of Perl materials, including documentation, style
  436. guides, tricks and traps, alternate ports to non-Unix systems and
  437. occasional binary distributions for these. Search engines for
  438. CPAN can be found at http://cpan.perl.com/ and at
  439. http://theory.uwinnipeg.ca/mod_perl/cpan-search.pl .
  440. Most importantly, CPAN includes around a thousand unbundled modules,
  441. some of which require a C compiler to build. Major categories of
  442. modules are:
  443. =over
  444. =item *
  445. Language Extensions and Documentation Tools
  446. =item *
  447. Development Support
  448. =item *
  449. Operating System Interfaces
  450. =item *
  451. Networking, Device Control (modems) and InterProcess Communication
  452. =item *
  453. Data Types and Data Type Utilities
  454. =item *
  455. Database Interfaces
  456. =item *
  457. User Interfaces
  458. =item *
  459. Interfaces to / Emulations of Other Programming Languages
  460. =item *
  461. File Names, File Systems and File Locking (see also File Handles)
  462. =item *
  463. String Processing, Language Text Processing, Parsing, and Searching
  464. =item *
  465. Option, Argument, Parameter, and Configuration File Processing
  466. =item *
  467. Internationalization and Locale
  468. =item *
  469. Authentication, Security, and Encryption
  470. =item *
  471. World Wide Web, HTML, HTTP, CGI, MIME
  472. =item *
  473. Server and Daemon Utilities
  474. =item *
  475. Archiving and Compression
  476. =item *
  477. Images, Pixmap and Bitmap Manipulation, Drawing, and Graphing
  478. =item *
  479. Mail and Usenet News
  480. =item *
  481. Control Flow Utilities (callbacks and exceptions etc)
  482. =item *
  483. File Handle and Input/Output Stream Utilities
  484. =item *
  485. Miscellaneous Modules
  486. =back
  487. Registered CPAN sites as of this writing include the following.
  488. You should try to choose one close to you:
  489. =head2 Africa
  490. =over 4
  491. =item *
  492. South Africa
  493. ftp://ftp.is.co.za/programming/perl/CPAN/
  494. ftp://ftp.saix.net/pub/CPAN/
  495. ftp://ftpza.co.za/pub/mirrors/cpan/
  496. ftp://ftp.sun.ac.za/CPAN/
  497. =back
  498. =head2 Asia
  499. =over 4
  500. =item *
  501. China
  502. ftp://freesoft.cei.gov.cn/pub/languages/perl/CPAN/
  503. http://www2.linuxforum.net/mirror/CPAN/
  504. http://cpan.shellhung.org/
  505. ftp://ftp.shellhung.org/pub/CPAN
  506. =item *
  507. Hong Kong
  508. http://CPAN.pacific.net.hk/
  509. ftp://ftp.pacific.net.hk/pub/mirror/CPAN/
  510. =item *
  511. Indonesia
  512. http://piksi.itb.ac.id/CPAN/
  513. ftp://mirrors.piksi.itb.ac.id/CPAN/
  514. http://CPAN.mweb.co.id/
  515. ftp://ftp.mweb.co.id/pub/languages/perl/CPAN/
  516. =item *
  517. Israel
  518. http://www.iglu.org.il:/pub/CPAN/
  519. ftp://ftp.iglu.org.il/pub/CPAN/
  520. http://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
  521. ftp://bioinfo.weizmann.ac.il/pub/software/perl/CPAN/
  522. =item *
  523. Japan
  524. ftp://ftp.u-aizu.ac.jp/pub/lang/perl/CPAN/
  525. ftp://ftp.kddlabs.co.jp/CPAN/
  526. http://mirror.nucba.ac.jp/mirror/Perl/
  527. ftp://mirror.nucba.ac.jp/mirror/Perl/
  528. ftp://ftp.meisei-u.ac.jp/pub/CPAN/
  529. ftp://ftp.jaist.ac.jp/pub/lang/perl/CPAN/
  530. ftp://ftp.dti.ad.jp/pub/lang/CPAN/
  531. ftp://ftp.ring.gr.jp/pub/lang/perl/CPAN/
  532. =item *
  533. Saudi Arabia
  534. ftp://ftp.isu.net.sa/pub/CPAN/
  535. =item *
  536. Singapore
  537. http://cpan.hjc.edu.sg
  538. http://ftp.nus.edu.sg/unix/perl/CPAN/
  539. ftp://ftp.nus.edu.sg/pub/unix/perl/CPAN/
  540. =item *
  541. South Korea
  542. http://CPAN.bora.net/
  543. ftp://ftp.bora.net/pub/CPAN/
  544. http://ftp.kornet.net/CPAN/
  545. ftp://ftp.kornet.net/pub/CPAN/
  546. ftp://ftp.nuri.net/pub/CPAN/
  547. =item *
  548. Taiwan
  549. ftp://coda.nctu.edu.tw/UNIX/perl/CPAN
  550. ftp://ftp.ee.ncku.edu.tw/pub/perl/CPAN/
  551. ftp://ftp1.sinica.edu.tw/pub1/perl/CPAN/
  552. =item *
  553. Thailand
  554. http://download.nectec.or.th/CPAN/
  555. ftp://ftp.nectec.or.th/pub/languages/CPAN/
  556. ftp://ftp.cs.riubon.ac.th/pub/mirrors/CPAN/
  557. =back
  558. =head2 Central America
  559. =over 4
  560. =item *
  561. Costa Rica
  562. ftp://ftp.linux.co.cr/mirrors/CPAN/
  563. http://ftp.ucr.ac.cr/Unix/CPAN/
  564. ftp://ftp.ucr.ac.cr/pub/Unix/CPAN/
  565. =back
  566. =head2 Europe
  567. =over 4
  568. =item *
  569. Austria
  570. ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN/
  571. =item *
  572. Belgium
  573. http://ftp.easynet.be/CPAN/
  574. ftp://ftp.easynet.be/CPAN/
  575. ftp://ftp.kulnet.kuleuven.ac.be/pub/mirror/CPAN/
  576. =item *
  577. Bulgaria
  578. ftp://ftp.ntrl.net/pub/mirrors/CPAN/
  579. =item *
  580. Croatia
  581. ftp://ftp.linux.hr/pub/CPAN/
  582. =item *
  583. Czech Republic
  584. http://www.fi.muni.cz/pub/perl/
  585. ftp://ftp.fi.muni.cz/pub/perl/
  586. ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN/
  587. =item *
  588. Denmark
  589. ftp://sunsite.auc.dk/pub/languages/perl/CPAN/
  590. http://www.cpan.dk/CPAN/
  591. ftp://www.cpan.dk/ftp.cpan.org/CPAN/
  592. =item *
  593. England
  594. http://www.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN
  595. ftp://ftp.mirror.ac.uk/sites/ftp.funet.fi/pub/languages/perl/CPAN/
  596. ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/
  597. ftp://ftp.flirble.org/pub/languages/perl/CPAN/
  598. ftp://ftp.plig.org/pub/CPAN/
  599. ftp://sunsite.doc.ic.ac.uk/packages/CPAN/
  600. http://mirror.uklinux.net/CPAN/
  601. ftp://mirror.uklinux.net/pub/CPAN/
  602. ftp://usit.shef.ac.uk/pub/packages/CPAN/
  603. =item *
  604. Estonia
  605. ftp://ftp.ut.ee/pub/languages/perl/CPAN/
  606. =item *
  607. Finland
  608. ftp://ftp.funet.fi/pub/languages/perl/CPAN/
  609. =item *
  610. France
  611. ftp://cpan.ftp.worldonline.fr/pub/CPAN/
  612. ftp://ftp.club-internet.fr/pub/perl/CPAN/
  613. ftp://ftp.lip6.fr/pub/perl/CPAN/
  614. ftp://ftp.oleane.net/pub/mirrors/CPAN/
  615. ftp://ftp.pasteur.fr/pub/computing/CPAN/
  616. ftp://cpan.cict.fr/pub/CPAN/
  617. ftp://ftp.uvsq.fr/pub/perl/CPAN/
  618. =item *
  619. Germany
  620. ftp://ftp.rz.ruhr-uni-bochum.de/pub/CPAN/
  621. ftp://ftp.freenet.de/pub/ftp.cpan.org/pub/CPAN/
  622. ftp://ftp.uni-erlangen.de/pub/source/CPAN/
  623. ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/CPAN
  624. ftp://ftp.gigabell.net/pub/CPAN/
  625. http://ftp.gwdg.de/pub/languages/perl/CPAN/
  626. ftp://ftp.gwdg.de/pub/languages/perl/CPAN/
  627. ftp://ftp.uni-hamburg.de/pub/soft/lang/perl/CPAN/
  628. ftp://ftp.leo.org/pub/comp/general/programming/languages/script/perl/CPAN/
  629. ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/
  630. ftp://ftp.gmd.de/mirrors/CPAN/
  631. =item *
  632. Greece
  633. ftp://ftp.forthnet.gr/pub/languages/perl/CPAN
  634. ftp://ftp.ntua.gr/pub/lang/perl/
  635. =item *
  636. Hungary
  637. http://cpan.artifact.hu/
  638. ftp://cpan.artifact.hu/CPAN/
  639. ftp://ftp.kfki.hu/pub/packages/perl/CPAN/
  640. =item *
  641. Iceland
  642. http://cpan.gm.is/
  643. ftp://ftp.gm.is/pub/CPAN/
  644. =item *
  645. Ireland
  646. http://cpan.indigo.ie/
  647. ftp://cpan.indigo.ie/pub/CPAN/
  648. http://sunsite.compapp.dcu.ie/pub/perl/
  649. ftp://sunsite.compapp.dcu.ie/pub/perl/
  650. =item *
  651. Italy
  652. http://cpan.nettuno.it/
  653. http://gusp.dyndns.org/CPAN/
  654. ftp://gusp.dyndns.org/pub/CPAN
  655. http://softcity.iol.it/cpan
  656. ftp://softcity.iol.it/pub/cpan
  657. ftp://ftp.unina.it/pub/Other/CPAN/
  658. ftp://ftp.unipi.it/pub/mirror/perl/CPAN/
  659. ftp://cis.uniRoma2.it/CPAN/
  660. ftp://ftp.edisontel.it/pub/CPAN_Mirror/
  661. ftp://ftp.flashnet.it/pub/CPAN/
  662. =item *
  663. Latvia
  664. http://kvin.lv/pub/CPAN/
  665. =item *
  666. Netherlands
  667. ftp://download.xs4all.nl/pub/mirror/CPAN/
  668. ftp://ftp.nl.uu.net/pub/CPAN/
  669. ftp://ftp.nluug.nl/pub/languages/perl/CPAN/
  670. ftp://ftp.cpan.nl/pub/CPAN/
  671. http://www.cs.uu.nl/mirror/CPAN/
  672. ftp://ftp.cs.uu.nl/mirror/CPAN/
  673. =item *
  674. Norway
  675. ftp://sunsite.uio.no/pub/languages/perl/CPAN/
  676. ftp://ftp.uit.no/pub/languages/perl/cpan/
  677. =item *
  678. Poland
  679. ftp://ftp.pk.edu.pl/pub/lang/perl/CPAN/
  680. ftp://ftp.mega.net.pl/pub/mirrors/ftp.perl.com/
  681. ftp://ftp.man.torun.pl/pub/doc/CPAN/
  682. ftp://sunsite.icm.edu.pl/pub/CPAN/
  683. =item *
  684. Portugal
  685. ftp://ftp.ua.pt/pub/CPAN/
  686. ftp://perl.di.uminho.pt/pub/CPAN/
  687. ftp://ftp.ist.utl.pt/pub/CPAN/
  688. ftp://ftp.netc.pt/pub/CPAN/
  689. =item *
  690. Romania
  691. ftp://archive.logicnet.ro/mirrors/ftp.cpan.org/CPAN/
  692. ftp://ftp.kappa.ro/pub/mirrors/ftp.perl.org/pub/CPAN/
  693. ftp://ftp.dntis.ro/pub/cpan/
  694. ftp://ftp.opsynet.com/cpan/
  695. ftp://ftp.dnttm.ro/pub/CPAN/
  696. ftp://ftp.timisoara.roedu.net/mirrors/CPAN/
  697. =item *
  698. Russia
  699. ftp://ftp.chg.ru/pub/lang/perl/CPAN/
  700. http://cpan.rinet.ru/
  701. ftp://cpan.rinet.ru/pub/mirror/CPAN/
  702. ftp://ftp.aha.ru/pub/CPAN/
  703. ftp://ftp.sai.msu.su/pub/lang/perl/CPAN/
  704. =item *
  705. Slovakia
  706. ftp://ftp.entry.sk/pub/languages/perl/CPAN/
  707. =item *
  708. Slovenia
  709. ftp://ftp.arnes.si/software/perl/CPAN/
  710. =item *
  711. Spain
  712. ftp://ftp.rediris.es/mirror/CPAN/
  713. ftp://ftp.etse.urv.es/pub/perl/
  714. =item *
  715. Sweden
  716. http://ftp.du.se/CPAN/
  717. ftp://ftp.du.se/pub/CPAN/
  718. ftp://ftp.sunet.se/pub/lang/perl/CPAN/
  719. =item *
  720. Switzerland
  721. ftp://ftp.danyk.ch/CPAN/
  722. ftp://sunsite.cnlab-switch.ch/mirror/CPAN/
  723. =item *
  724. Turkey
  725. ftp://sunsite.bilkent.edu.tr/pub/languages/CPAN/
  726. =back
  727. =head2 North America
  728. =over 4
  729. =item *
  730. Canada
  731. =over 8
  732. =item *
  733. Alberta
  734. http://sunsite.ualberta.ca/pub/Mirror/CPAN/
  735. ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/
  736. =item *
  737. Manitoba
  738. http://theoryx5.uwinnipeg.ca/pub/CPAN/
  739. ftp://theoryx5.uwinnipeg.ca/pub/CPAN/
  740. =item *
  741. Nova Scotia
  742. ftp://cpan.chebucto.ns.ca/pub/CPAN/
  743. =item *
  744. Ontario
  745. ftp://ftp.crc.ca/pub/packages/lang/perl/CPAN/
  746. =item *
  747. Mexico
  748. http://www.msg.com.mx/CPAN/
  749. ftp://ftp.msg.com.mx/pub/CPAN/
  750. =back
  751. =item *
  752. United States
  753. =over 8
  754. =item *
  755. Alabama
  756. http://mirror.hiwaay.net/CPAN/
  757. ftp://mirror.hiwaay.net/CPAN/
  758. =item *
  759. California
  760. http://www.cpan.org/
  761. ftp://ftp.cpan.org/CPAN/
  762. ftp://cpan.nas.nasa.gov/pub/perl/CPAN/
  763. ftp://ftp.digital.com/pub/plan/perl/CPAN/
  764. http://www.kernel.org/pub/mirrors/cpan/
  765. ftp://ftp.kernel.org/pub/mirrors/cpan/
  766. http://www.perl.com/CPAN/
  767. http://download.sourceforge.net/mirrors/CPAN/
  768. =item *
  769. Colorado
  770. ftp://ftp.cs.colorado.edu/pub/perl/CPAN/
  771. =item *
  772. Florida
  773. ftp://ftp.cise.ufl.edu/pub/perl/CPAN/
  774. =item *
  775. Georgia
  776. ftp://ftp.twoguys.org/CPAN/
  777. =item *
  778. Illinois
  779. http://www.neurogames.com/mirrors/CPAN
  780. http://uiarchive.uiuc.edu/mirrors/ftp/ftp.cpan.org/pub/CPAN/
  781. ftp://uiarchive.uiuc.edu/mirrors/ftp/ftp.cpan.org/pub/CPAN/
  782. =item *
  783. Indiana
  784. ftp://ftp.uwsg.indiana.edu/pub/perl/CPAN/
  785. http://cpan.nitco.com/
  786. ftp://cpan.nitco.com/pub/CPAN/
  787. ftp://cpan.in-span.net/
  788. http://csociety-ftp.ecn.purdue.edu/pub/CPAN
  789. ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN
  790. =item *
  791. Kentucky
  792. http://cpan.uky.edu/
  793. ftp://cpan.uky.edu/pub/CPAN/
  794. =item *
  795. Massachusetts
  796. ftp://ftp.ccs.neu.edu/net/mirrors/ftp.funet.fi/pub/languages/perl/CPAN/
  797. ftp://ftp.iguide.com/pub/mirrors/packages/perl/CPAN/
  798. =item *
  799. New Jersey
  800. ftp://ftp.cpanel.net/pub/CPAN/
  801. =item *
  802. New York
  803. ftp://ftp.freesoftware.com/pub/perl/CPAN/
  804. http://www.deao.net/mirrors/CPAN/
  805. ftp://ftp.deao.net/pub/CPAN/
  806. ftp://ftp.stealth.net/pub/mirrors/ftp.cpan.org/pub/CPAN/
  807. http://mirror.nyc.anidea.com/CPAN/
  808. ftp://mirror.nyc.anidea.com/pub/CPAN/
  809. http://www.rge.com/pub/languages/perl/
  810. ftp://ftp.rge.com/pub/languages/perl/
  811. ftp://mirrors.cloud9.net/pub/mirrors/CPAN/
  812. =item *
  813. North Carolina
  814. ftp://ftp.duke.edu/pub/perl/
  815. =item *
  816. Ohio
  817. ftp://ftp.loaded.net/pub/CPAN/
  818. =item *
  819. Oklahoma
  820. ftp://ftp.ou.edu/mirrors/CPAN/
  821. =item *
  822. Oregon
  823. ftp://ftp.orst.edu/pub/packages/CPAN/
  824. =item *
  825. Pennsylvania
  826. http://ftp.epix.net/CPAN/
  827. ftp://ftp.epix.net/pub/languages/perl/
  828. ftp://carroll.cac.psu.edu/pub/CPAN/
  829. =item *
  830. Tennessee
  831. ftp://ftp.sunsite.utk.edu/pub/CPAN/
  832. =item *
  833. Texas
  834. http://ftp.sedl.org/pub/mirrors/CPAN/
  835. http://jhcloos.com/pub/mirror/CPAN/
  836. ftp://jhcloos.com/pub/mirror/CPAN/
  837. =item *
  838. Utah
  839. ftp://mirror.xmission.com/CPAN/
  840. =item *
  841. Virginia
  842. http://mirrors.rcn.net/pub/lang/CPAN/
  843. ftp://mirrors.rcn.net/pub/lang/CPAN/
  844. ftp://ruff.cs.jmu.edu/pub/CPAN/
  845. http://perl.Liquidation.com/CPAN/
  846. =item *
  847. Washington
  848. http://cpan.llarian.net/
  849. ftp://cpan.llarian.net/pub/CPAN/
  850. ftp://ftp-mirror.internap.com/pub/CPAN/
  851. ftp://ftp.spu.edu/pub/CPAN/
  852. =back
  853. =back
  854. =head2 Oceania
  855. =over 4
  856. =item *
  857. Australia
  858. http://ftp.planetmirror.com/pub/CPAN/
  859. ftp://ftp.planetmirror.com/pub/CPAN/
  860. ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
  861. ftp://cpan.topend.com.au/pub/CPAN/
  862. =item *
  863. New Zealand
  864. ftp://ftp.auckland.ac.nz/pub/perl/CPAN/
  865. =back
  866. =head2 South America
  867. =over 4
  868. =item *
  869. Argentina
  870. ftp://mirrors.bannerlandia.com.ar/mirrors/CPAN/
  871. =item *
  872. Brazil
  873. ftp://cpan.pop-mg.com.br/pub/CPAN/
  874. ftp://ftp.matrix.com.br/pub/perl/
  875. ftp://cpan.if.usp.br/pub/mirror/CPAN/
  876. =item *
  877. Chile
  878. ftp://ftp.psinet.cl/pub/programming/perl/CPAN/
  879. ftp://sunsite.dcc.uchile.cl/pub/lang/perl/
  880. =back
  881. For an up-to-date listing of CPAN sites,
  882. see http://www.cpan.org/SITES or ftp://www.cpan.org/SITES .
  883. =head1 Modules: Creation, Use, and Abuse
  884. (The following section is borrowed directly from Tim Bunce's modules
  885. file, available at your nearest CPAN site.)
  886. Perl implements a class using a package, but the presence of a
  887. package doesn't imply the presence of a class. A package is just a
  888. namespace. A class is a package that provides subroutines that can be
  889. used as methods. A method is just a subroutine that expects, as its
  890. first argument, either the name of a package (for "static" methods),
  891. or a reference to something (for "virtual" methods).
  892. A module is a file that (by convention) provides a class of the same
  893. name (sans the .pm), plus an import method in that class that can be
  894. called to fetch exported symbols. This module may implement some of
  895. its methods by loading dynamic C or C++ objects, but that should be
  896. totally transparent to the user of the module. Likewise, the module
  897. might set up an AUTOLOAD function to slurp in subroutine definitions on
  898. demand, but this is also transparent. Only the F<.pm> file is required to
  899. exist. See L<perlsub>, L<perltoot>, and L<AutoLoader> for details about
  900. the AUTOLOAD mechanism.
  901. =head2 Guidelines for Module Creation
  902. =over 4
  903. =item *
  904. Do similar modules already exist in some form?
  905. If so, please try to reuse the existing modules either in whole or
  906. by inheriting useful features into a new class. If this is not
  907. practical try to get together with the module authors to work on
  908. extending or enhancing the functionality of the existing modules.
  909. A perfect example is the plethora of packages in perl4 for dealing
  910. with command line options.
  911. If you are writing a module to expand an already existing set of
  912. modules, please coordinate with the author of the package. It
  913. helps if you follow the same naming scheme and module interaction
  914. scheme as the original author.
  915. =item *
  916. Try to design the new module to be easy to extend and reuse.
  917. Try to C<use warnings;> (or C<use warnings qw(...);>).
  918. Remember that you can add C<no warnings qw(...);> to individual blocks
  919. of code that need less warnings.
  920. Use blessed references. Use the two argument form of bless to bless
  921. into the class name given as the first parameter of the constructor,
  922. e.g.,:
  923. sub new {
  924. my $class = shift;
  925. return bless {}, $class;
  926. }
  927. or even this if you'd like it to be used as either a static
  928. or a virtual method.
  929. sub new {
  930. my $self = shift;
  931. my $class = ref($self) || $self;
  932. return bless {}, $class;
  933. }
  934. Pass arrays as references so more parameters can be added later
  935. (it's also faster). Convert functions into methods where
  936. appropriate. Split large methods into smaller more flexible ones.
  937. Inherit methods from other modules if appropriate.
  938. Avoid class name tests like: C<die "Invalid" unless ref $ref eq 'FOO'>.
  939. Generally you can delete the C<eq 'FOO'> part with no harm at all.
  940. Let the objects look after themselves! Generally, avoid hard-wired
  941. class names as far as possible.
  942. Avoid C<< $r->Class::func() >> where using C<@ISA=qw(... Class ...)> and
  943. C<< $r->func() >> would work (see L<perlbot> for more details).
  944. Use autosplit so little used or newly added functions won't be a
  945. burden to programs that don't use them. Add test functions to
  946. the module after __END__ either using AutoSplit or by saying:
  947. eval join('',<main::DATA>) || die $@ unless caller();
  948. Does your module pass the 'empty subclass' test? If you say
  949. C<@SUBCLASS::ISA = qw(YOURCLASS);> your applications should be able
  950. to use SUBCLASS in exactly the same way as YOURCLASS. For example,
  951. does your application still work if you change: C<$obj = new YOURCLASS;>
  952. into: C<$obj = new SUBCLASS;> ?
  953. Avoid keeping any state information in your packages. It makes it
  954. difficult for multiple other packages to use yours. Keep state
  955. information in objects.
  956. Always use B<-w>.
  957. Try to C<use strict;> (or C<use strict qw(...);>).
  958. Remember that you can add C<no strict qw(...);> to individual blocks
  959. of code that need less strictness.
  960. Always use B<-w>.
  961. Follow the guidelines in the perlstyle(1) manual.
  962. Always use B<-w>.
  963. =item *
  964. Some simple style guidelines
  965. The perlstyle manual supplied with Perl has many helpful points.
  966. Coding style is a matter of personal taste. Many people evolve their
  967. style over several years as they learn what helps them write and
  968. maintain good code. Here's one set of assorted suggestions that
  969. seem to be widely used by experienced developers:
  970. Use underscores to separate words. It is generally easier to read
  971. $var_names_like_this than $VarNamesLikeThis, especially for
  972. non-native speakers of English. It's also a simple rule that works
  973. consistently with VAR_NAMES_LIKE_THIS.
  974. Package/Module names are an exception to this rule. Perl informally
  975. reserves lowercase module names for 'pragma' modules like integer
  976. and strict. Other modules normally begin with a capital letter and
  977. use mixed case with no underscores (need to be short and portable).
  978. You may find it helpful to use letter case to indicate the scope
  979. or nature of a variable. For example:
  980. $ALL_CAPS_HERE constants only (beware clashes with Perl vars)
  981. $Some_Caps_Here package-wide global/static
  982. $no_caps_here function scope my() or local() variables
  983. Function and method names seem to work best as all lowercase.
  984. e.g., C<< $obj->as_string() >>.
  985. You can use a leading underscore to indicate that a variable or
  986. function should not be used outside the package that defined it.
  987. =item *
  988. Select what to export.
  989. Do NOT export method names!
  990. Do NOT export anything else by default without a good reason!
  991. Exports pollute the namespace of the module user. If you must
  992. export try to use @EXPORT_OK in preference to @EXPORT and avoid
  993. short or common names to reduce the risk of name clashes.
  994. Generally anything not exported is still accessible from outside the
  995. module using the ModuleName::item_name (or C<< $blessed_ref->method >>)
  996. syntax. By convention you can use a leading underscore on names to
  997. indicate informally that they are 'internal' and not for public use.
  998. (It is actually possible to get private functions by saying:
  999. C<my $subref = sub { ... }; &$subref;>. But there's no way to call that
  1000. directly as a method, because a method must have a name in the symbol
  1001. table.)
  1002. As a general rule, if the module is trying to be object oriented
  1003. then export nothing. If it's just a collection of functions then
  1004. @EXPORT_OK anything but use @EXPORT with caution.
  1005. =item *
  1006. Select a name for the module.
  1007. This name should be as descriptive, accurate, and complete as
  1008. possible. Avoid any risk of ambiguity. Always try to use two or
  1009. more whole words. Generally the name should reflect what is special
  1010. about what the module does rather than how it does it. Please use
  1011. nested module names to group informally or categorize a module.
  1012. There should be a very good reason for a module not to have a nested name.
  1013. Module names should begin with a capital letter.
  1014. Having 57 modules all called Sort will not make life easy for anyone
  1015. (though having 23 called Sort::Quick is only marginally better :-).
  1016. Imagine someone trying to install your module alongside many others.
  1017. If in any doubt ask for suggestions in comp.lang.perl.misc.
  1018. If you are developing a suite of related modules/classes it's good
  1019. practice to use nested classes with a common prefix as this will
  1020. avoid namespace clashes. For example: Xyz::Control, Xyz::View,
  1021. Xyz::Model etc. Use the modules in this list as a naming guide.
  1022. If adding a new module to a set, follow the original author's
  1023. standards for naming modules and the interface to methods in
  1024. those modules.
  1025. If developing modules for private internal or project specific use,
  1026. that will never be released to the public, then you should ensure
  1027. that their names will not clash with any future public module. You
  1028. can do this either by using the reserved Local::* category or by
  1029. using a category name that includes an underscore like Foo_Corp::*.
  1030. To be portable each component of a module name should be limited to
  1031. 11 characters. If it might be used on MS-DOS then try to ensure each is
  1032. unique in the first 8 characters. Nested modules make this easier.
  1033. =item *
  1034. Have you got it right?
  1035. How do you know that you've made the right decisions? Have you
  1036. picked an interface design that will cause problems later? Have
  1037. you picked the most appropriate name? Do you have any questions?
  1038. The best way to know for sure, and pick up many helpful suggestions,
  1039. is to ask someone who knows. Comp.lang.perl.misc is read by just about
  1040. all the people who develop modules and it's the best place to ask.
  1041. All you need to do is post a short summary of the module, its
  1042. purpose and interfaces. A few lines on each of the main methods is
  1043. probably enough. (If you post the whole module it might be ignored
  1044. by busy people - generally the very people you want to read it!)
  1045. Don't worry about posting if you can't say when the module will be
  1046. ready - just say so in the message. It might be worth inviting
  1047. others to help you, they may be able to complete it for you!
  1048. =item *
  1049. README and other Additional Files.
  1050. It's well known that software developers usually fully document the
  1051. software they write. If, however, the world is in urgent need of
  1052. your software and there is not enough time to write the full
  1053. documentation please at least provide a README file containing:
  1054. =over 10
  1055. =item *
  1056. A description of the module/package/extension etc.
  1057. =item *
  1058. A copyright notice - see below.
  1059. =item *
  1060. Prerequisites - what else you may need to have.
  1061. =item *
  1062. How to build it - possible changes to Makefile.PL etc.
  1063. =item *
  1064. How to install it.
  1065. =item *
  1066. Recent changes in this release, especially incompatibilities
  1067. =item *
  1068. Changes / enhancements you plan to make in the future.
  1069. =back
  1070. If the README file seems to be getting too large you may wish to
  1071. split out some of the sections into separate files: INSTALL,
  1072. Copying, ToDo etc.
  1073. =over 4
  1074. =item Adding a Copyright Notice.
  1075. How you choose to license your work is a personal decision.
  1076. The general mechanism is to assert your Copyright and then make
  1077. a declaration of how others may copy/use/modify your work.
  1078. Perl, for example, is supplied with two types of licence: The GNU
  1079. GPL and The Artistic Licence (see the files README, Copying, and
  1080. Artistic). Larry has good reasons for NOT just using the GNU GPL.
  1081. My personal recommendation, out of respect for Larry, Perl, and the
  1082. Perl community at large is to state something simply like:
  1083. Copyright (c) 1995 Your Name. All rights reserved.
  1084. This program is free software; you can redistribute it and/or
  1085. modify it under the same terms as Perl itself.
  1086. This statement should at least appear in the README file. You may
  1087. also wish to include it in a Copying file and your source files.
  1088. Remember to include the other words in addition to the Copyright.
  1089. =item *
  1090. Give the module a version/issue/release number.
  1091. To be fully compatible with the Exporter and MakeMaker modules you
  1092. should store your module's version number in a non-my package
  1093. variable called $VERSION. This should be a floating point
  1094. number with at least two digits after the decimal (i.e., hundredths,
  1095. e.g, C<$VERSION = "0.01">). Don't use a "1.3.2" style version.
  1096. See L<Exporter> for details.
  1097. It may be handy to add a function or method to retrieve the number.
  1098. Use the number in announcements and archive file names when
  1099. releasing the module (ModuleName-1.02.tar.Z).
  1100. See perldoc ExtUtils::MakeMaker.pm for details.
  1101. =item *
  1102. How to release and distribute a module.
  1103. It's good idea to post an announcement of the availability of your
  1104. module (or the module itself if small) to the comp.lang.perl.announce
  1105. Usenet newsgroup. This will at least ensure very wide once-off
  1106. distribution.
  1107. If possible, register the module with CPAN. You should
  1108. include details of its location in your announcement.
  1109. Some notes about ftp archives: Please use a long descriptive file
  1110. name that includes the version number. Most incoming directories
  1111. will not be readable/listable, i.e., you won't be able to see your
  1112. file after uploading it. Remember to send your email notification
  1113. message as soon as possible after uploading else your file may get
  1114. deleted automatically. Allow time for the file to be processed
  1115. and/or check the file has been processed before announcing its
  1116. location.
  1117. FTP Archives for Perl Modules:
  1118. Follow the instructions and links on:
  1119. http://www.cpan.org/modules/00modlist.long.html
  1120. http://www.cpan.org/modules/04pause.html
  1121. or upload to one of these sites:
  1122. https://pause.kbx.de/pause/
  1123. http://pause.perl.org/pause/
  1124. and notify <[email protected]>.
  1125. By using the WWW interface you can ask the Upload Server to mirror
  1126. your modules from your ftp or WWW site into your own directory on
  1127. CPAN!
  1128. Please remember to send me an updated entry for the Module list!
  1129. =item *
  1130. Take care when changing a released module.
  1131. Always strive to remain compatible with previous released versions.
  1132. Otherwise try to add a mechanism to revert to the
  1133. old behavior if people rely on it. Document incompatible changes.
  1134. =back
  1135. =back
  1136. =head2 Guidelines for Converting Perl 4 Library Scripts into Modules
  1137. =over 4
  1138. =item *
  1139. There is no requirement to convert anything.
  1140. If it ain't broke, don't fix it! Perl 4 library scripts should
  1141. continue to work with no problems. You may need to make some minor
  1142. changes (like escaping non-array @'s in double quoted strings) but
  1143. there is no need to convert a .pl file into a Module for just that.
  1144. =item *
  1145. Consider the implications.
  1146. All Perl applications that make use of the script will need to
  1147. be changed (slightly) if the script is converted into a module. Is
  1148. it worth it unless you plan to make other changes at the same time?
  1149. =item *
  1150. Make the most of the opportunity.
  1151. If you are going to convert the script to a module you can use the
  1152. opportunity to redesign the interface. The guidelines for module
  1153. creation above include many of the issues you should consider.
  1154. =item *
  1155. The pl2pm utility will get you started.
  1156. This utility will read *.pl files (given as parameters) and write
  1157. corresponding *.pm files. The pl2pm utilities does the following:
  1158. =over 10
  1159. =item *
  1160. Adds the standard Module prologue lines
  1161. =item *
  1162. Converts package specifiers from ' to ::
  1163. =item *
  1164. Converts die(...) to croak(...)
  1165. =item *
  1166. Several other minor changes
  1167. =back
  1168. Being a mechanical process pl2pm is not bullet proof. The converted
  1169. code will need careful checking, especially any package statements.
  1170. Don't delete the original .pl file till the new .pm one works!
  1171. =back
  1172. =head2 Guidelines for Reusing Application Code
  1173. =over 4
  1174. =item *
  1175. Complete applications rarely belong in the Perl Module Library.
  1176. =item *
  1177. Many applications contain some Perl code that could be reused.
  1178. Help save the world! Share your code in a form that makes it easy
  1179. to reuse.
  1180. =item *
  1181. Break-out the reusable code into one or more separate module files.
  1182. =item *
  1183. Take the opportunity to reconsider and redesign the interfaces.
  1184. =item *
  1185. In some cases the 'application' can then be reduced to a small
  1186. fragment of code built on top of the reusable modules. In these cases
  1187. the application could invoked as:
  1188. % perl -e 'use Module::Name; method(@ARGV)' ...
  1189. or
  1190. % perl -mModule::Name ... (in perl5.002 or higher)
  1191. =back
  1192. =head1 NOTE
  1193. Perl does not enforce private and public parts of its modules as you may
  1194. have been used to in other languages like C++, Ada, or Modula-17. Perl
  1195. doesn't have an infatuation with enforced privacy. It would prefer
  1196. that you stayed out of its living room because you weren't invited, not
  1197. because it has a shotgun.
  1198. The module and its user have a contract, part of which is common law,
  1199. and part of which is "written". Part of the common law contract is
  1200. that a module doesn't pollute any namespace it wasn't asked to. The
  1201. written contract for the module (A.K.A. documentation) may make other
  1202. provisions. But then you know when you C<use RedefineTheWorld> that
  1203. you're redefining the world and willing to take the consequences.