Uploading Your Module Distribution

Chapter 5 - Submitting Your Module to CPAN
by?Sam Tregar?
Apress ? 2002
has companion web siteCompanion Web Site

When you have a new version of your module to release, you'll use the PAUSE upload file form (see Figure 5-2), found in the User Menu sidebar at http://www.pause.cpan.org. There are three ways to upload your module distribution to CPAN: using HTTP upload, providing a URL, and via FTP.

click to expand
Figure 5-2: The PAUSE file upload form

HTTP Upload

Using HTTP upload is the easiest method in most situations. You'll need a modern[5] Web browser since many older browsers don't implement file upload correctly. To use this method, simply click the Browse button next to the file upload box and find the module distribution file you wish to upload. Then click the Upload this file from my disk button.

GET URL

The GET URL option allows you to tell PAUSE where to find your module on the Web. PAUSE will then go and retrieve this file for you. This option might be useful for projects that distribute modules on CPAN but also maintain a Web site that contains their module distributions. To use this method, enter the URL in the box and click the Upload this URL button.

FTP PUT

The FTP PUT method allows you to use FTP to upload a file to PAUSE. This is useful when you're doing development on a machine that can't run a modern Web browser. To use this method, first connect to the FTP server at pause.cpan.org via an FTP client. Log in as anonymous and use your e-mail address as your password. Change into the incoming directory and upload your file.

Next, use a Web browser to visit the upload form on the PAUSE Web interface. At the bottom of the form, you'll see a list of module distributions—these are all the distributions waiting in the incoming directory. Select yours and click the Upload the checked file button.

Caution 

Make sure you transfer your file in binary mode. Transferring a distribution in ASCII mode will result in a broken distribution. In command-line FTP clients, the binary command is used to switch to binary mode.

Dealing with a Broken Upload

One way or another you'll eventually upload a broken file to CPAN. Either you'll transfer the file in ASCII mode FTP, or you'll forget to update some key piece of your distribution. There's only one way to deal with this situation—release a new version. This is because PAUSE will never allow you to upload a file with the same filename twice. Once you've uploaded MyModule-0.02.tar.gz, release 0.02 is set in stone. To fix a problem, you'll need to increment the version number and release MyModule-0.03.tar.gz.

[5]Netscape Navigator 4.0+ or Microsoft Internet Explorer 4.0+, but other browsers will certainly work.



Writing Perl Modules for CPAN
Writing Perl Modules for CPAN
ISBN: 159059018X
EAN: 2147483647
Year: 2002
Pages: 110
Authors: Sam Tregar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net