sman has asked for the wisdom of the Perl Monks concerning the following question:

Hello all, I have a novice question here and would like to hear your advice. I just finished some modules and want to upload to PAUSE. The following is the directory structure. Should I just compress the src to a tar.gz and upload, or need additional configure files to do it? Any idea is very welcome. Thanks. =======================================================
[xyz@fedora src]$ ls -lR .: total 20 -rw-rw-r-- 1 xyz xyz 1317 2010-03-25 09:52 calc.pl drwxrwxr-x 3 xyz xyz 4096 2010-02-15 19:50 xyz -rw-rw-r-- 1 xyz xyz 93 2010-02-20 16:20 input.dat -rwxr-xr-x 1 xyz xyz 13 2010-02-20 16:19 r1.sh -rwxr-xr-x 1 xyz xyz 23 2010-02-20 16:20 r2.sh ./xyz: total 4 drwxrwxr-x 3 xyz xyz 4096 2010-02-15 16:37 rpn ./xyz/rpn: total 4 drwxrwxr-x 2 xyz xyz 4096 2010-02-23 10:00 deco ./xyz/rpn/deco: total 44 -rw-rw-r-- 1 xyz xyz 620 2010-02-15 18:29 CalcDeco.pm -rw-rw-r-- 1 xyz xyz 221 2010-02-15 18:37 CalcImpl.pm -rw-rw-r-- 1 xyz xyz 327 2010-02-15 19:38 Divide.pm -rw-rw-r-- 1 xyz xyz 81 2010-02-15 16:43 ICalc.pm -rw-rw-r-- 1 xyz xyz 321 2010-02-15 19:26 Minus.pm -rw-rw-r-- 1 xyz xyz 317 2010-02-15 20:10 Mod.pm -rw-rw-r-- 1 xyz xyz 323 2010-02-15 19:40 Multiply.pm -rw-rw-r-- 1 xyz xyz 219 2010-02-15 19:43 MyStack.pm -rw-rw-r-- 1 xyz xyz 319 2010-02-15 19:31 Plus.pm -rw-rw-r-- 1 xyz xyz 291 2010-02-15 20:15 Sqrt.pm -rw-rw-r-- 1 xyz xyz 716 2010-02-15 19:53 Token.pm [xyz@fedora src]$

Replies are listed 'Best First'.
Re: PAUSE upload
by toolic (Bishop) on Mar 25, 2010 at 17:56 UTC
    If you want your modules to be properly displayed, easily downloaded from CPAN and tested by CPAN Testers, you should add more configuration files. These links will show you what files are conventionally used, along with a typical directory structure:
Re: PAUSE upload
by ikegami (Patriarch) on Mar 25, 2010 at 22:10 UTC
    Note that rpn::deco:: is not a good namespace. All lowercase is frown upon for anything but pragmas. You should be using CamelCase, although all uppercase is fine when the situation warrants it (e.g. Rpn and RPN are both acceptable). You should also try to tie in your namespace with existing namespaces when possible.
Re: PAUSE upload
by jdrago999 (Pilgrim) on Mar 25, 2010 at 22:03 UTC

    You could, like, try downloading a Perl module from CPAN - and poke around its files.

    Personally I use Module::Install. You can see what it looks like here: Event::Lite Download Link. The docs for Module::Install are long and unless I missed something don't really have a "START HERE DUMMY" (which I sure could have used) - but it works basically like this:

    Make Your Folder

    1. Say your module is "My::Module::(Something)" - make a folder named "My-Module"
    2. In there, make a folder named "My-Modulelib/My/Module" and put all your *.pm files in "My-Module/lib/My/Module"
    3. Make a folder named "My-Module/inc" and copy all the files from the "inc" folder in the link above.
    4. Make "My-Module/Makefile.PL" - you could copy-n-paste the one from the link above and just substitute "My-Module" for "Event-Lite" and "lib/My/Module.pm" for "lib/Event/Lite.pm" and so on.
    5. List the modules your module requires for testing and for installation.
    6. Make some unit tests (*.t files) and put them in a folder named "My-Module/t/"
    7. Add a "My-Module/Changes" text file (like every other Perl module has) that describes what happened in each release.
    8. Add some POD documentation to your *.pm files wherever appropriate.

    When you're ready to upload to CPAN

    1. cd My-Module
    2. perl Makefile.PL
    3. If there were problems - then fix them before continuing.
    4. make
    5. make manifest -- (lots of filenames that look familiar should scroll by)
    6. make disttest -- (this will pretend to install your module without really installing it).
    7. make dist -- this will make the *.tar.gz file for you.
    8. Go to The PAUSE Website and login.
    9. Click "Upload a file to CPAN" on the left.
    10. Upload your file.
    11. A few hours later it will appear on http://search.cpan.org/
    12. ??????
    13. PROFIT!!!!
Re: PAUSE upload
by pemungkah (Priest) on Mar 25, 2010 at 22:28 UTC
    I'm guessing from the names I see here that this is an RPN calculator application; as such, its best namespace would be App::, and I'd recommend App::Calculator::RPN or maybe App::RPNCalc. (I'd also change the calc.pl to rpncalc or calc_rpn, as those are less likely to collide with someone else's name.)

    I'd put a vote in for Dist::Zilla as a possible tool for you as well. There's an intro to it here. (I haven't switched to it yet but I'm strongly considering it.)

    One of the nice things about using one of the standard build tools is that they all have a make dist or equivalent command that builds your tar.gz file for you. They also have a make test, which is also a good habit to get into using.

      Thanks a lot for all the replies.