[Thousand-oaks-pm] Authoring a CPAN Module

Aran Deltac adeltac at valueclick.com
Thu May 15 07:38:30 PDT 2008


Well, the module as been indexed by CPAN:

http://search.cpan.org/~bluefeet/Games-EveOnline-API-0.01/

And it already has 10 passes and 2 NAs from CPAN Testers.  Here's a quick overview of everything we talked about.  This is *my* way to package a module for distribution on CPAN.  There are other options, if you are so inclined to dig deeper.

 - Install Model::Install if you haven't already done so.
   You can check with this command:
   perl -MModule::Install -e 'print "Installed.\n"'
 - Write a module.  Let's call it Yo::Blah.
 - Create a directory for it.  A good name would be /Yo-Blah/.
 - Move the module to: /Yo-Blah/lib/Yo/Blah.pm
 - Write a .t file for it: /Yo-Blah/t/00_use.t
    use strict;
    use warnings;
    use Test::More tests => 1;
    use_ok( 'Yo::Blah' );
 - Create: /Yo-Blah/Makefile.PL
    Use: http://search.cpan.org/src/BLUEFEET/Games-EveOnline-API-0.01/Makefile.PL
    As a template.
    Read the documentation for Module::Install for more options.
 - Run the Makefile.PL.
    perl Makefile.PL
    There should be no errors.
 - Run make and make test.
    There should be no errors and you should see 00_use.t passing.
 - Create: /Yo-Blah/README
 - Create: /Yo-Blah/CHANGES
 - Run: make manifest
 - Double check that everything in META.yml is correct.
    Your module should have a line like this for version:
    our $VERSION = '0.01';
 - Check most of the files that we've created in to your version control system.  Check out the code somewhere else, but in to a directory named /Yo-Blah-0.01/.  The files would be:
    README
    CHANGES
    MANIFEST
    Makefile.pl
    t/*
    inc/*
    lib/*
    META.yml
 - Now tarball the /Yo-Blah-0.01/ directory (and all of it's contents) in to Yo-Blah-0.01.tar.gz.
 - Create an account on http://pause.perl.org/.
 - Upload your tarball.
 - Drink more coffee while you wait for it to be indexed.

Aran Deltac

ValueClick Media
Software Engineering Manager
818-575-4727 (desk)
818-263-2104 (cell) 


This email and any files included with it may contain proprietary and/or confidential information that is privileged and confidential and is for the sole use of the intended recipient(s).  Any disclosure, copying, distribution, posting, or use of the information contained in or attached to this email is prohibited unless permitted by the sender.  If you have received this email in error, please immediately notify the sender via return e-mail, telephone, or fax and destroy this original transmission and its included files without reading or saving it in any manner. Thank you.



More information about the Thousand-oaks-pm mailing list