FAQ
I've written a program called makepmdist (which I'm planning to put in
CPAN, once I get a bit of feedback on it) that simplifies the task of
making a dist of a single module. It's not meant to handle every kind of
module in CPAN. It's just meant to the common case of a pure-Perl modules
that is the only module in its dist. (For example, that describes about
half of the dists in my CPAN directory.)

Basically, you say "makepmdist Foo.pm" and it does some very minimal
sanity-checking on Foo.pm, then makes a temp directory in which it copies
Foo.pm, makes a Makefile.PL, a README, a MANIFEST, and a t/test.t. Details
of the contents of the Makefile.PL and the t/test.t are controlled by
optional =for blocks in the Foo.pm file. (It also does some nice things
like make sure that the Foo.pm that gets disted is in Unix newline format
and has a $VERSION; and it warns about any ridiculously long lines in the
file.) Then it makes test, dist, clean, moves the resulting .tar.gz up and
out, and kills the temp dir -- unless there was a fatal error along the
way, at which point it would just abort and let you ponder the temp dir's
contents.

I wrote this someone at YAPC about two years ago said it'd be nice if
disting a module were a one-step process; and I liked that idea. Well, it
almost is one-step now, if the module is simple enough (i.e., no XS, and is
the only module in the dist), and if you don't count the part about
actually submitting it to PAUSE, which would bring this to an aching TWO
steps.

I would appreciate if people would look at the program at its temporary
location, at
http://members.spinn.net/~sburke/makepmdist_101.txt
and consider its docs, and test it out if you can, and let me know how it
works for you.

You probably have questions, and they are probably answered in the Pod
that's at the end of that program file.


--
Sean M. Burke sburke@cpan.org http://www.spinn.net/~sburke/

Search Discussions

  • Elaine -HFB- Ashton at Feb 17, 2002 at 6:07 am
    Sean M. Burke [sburke@cpan.org] quoth:
    *>I've written a program called makepmdist (which I'm planning to put in
    *>CPAN, once I get a bit of feedback on it) that simplifies the task of
    *>making a dist of a single module. It's not meant to handle every kind of
    *>module in CPAN. It's just meant to the common case of a pure-Perl modules
    *>that is the only module in its dist. (For example, that describes about
    *>half of the dists in my CPAN directory.)

    mkdir requires a mode argument and I get the error
    Can't find "package Foo;" line in <module>.pm
    even though the package is defined at the top of the module but if I
    add an empty line at the top of the module it works.

    Also, if the version string is undef it should barf and refuse to wrok
    until they include a version, but that's just the version tsar in me :)

    Looks nice and I especially like the newline stripping :)

    You should maybe send this to cpan-testers and see if they like it and if
    you can get a win32 guinea pig.

    e.
  • Michael G Schwern at Feb 17, 2002 at 10:13 pm

    On Sun, Feb 17, 2002 at 12:07:44AM -0600, Elaine -HFB- Ashton wrote:
    mkdir requires a mode argument
    The mode argument is optional. Defaults to 0777 (mod your umask).


    --

    Michael G. Schwern <schwern@pobox.com> http://www.pobox.com/~schwern/
    Perl Quality Assurance <perl-qa@perl.org> Kwalitee Is Job One
    The desired effect is what you get when you improve your interplanetary
    funksmanship.
  • Randal L. Schwartz at Feb 18, 2002 at 6:56 am
    "Michael" == Michael G Schwern writes:
    Michael> On Sun, Feb 17, 2002 at 12:07:44AM -0600, Elaine -HFB- Ashton wrote:
    mkdir requires a mode argument
    Michael> The mode argument is optional. Defaults to 0777 (mod your umask).

    Only in recent Perls. 5.5.3 is not recent enough, for example.

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
  • Jarkko Hietaniemi at Mar 2, 2002 at 4:18 am

    On Sun, Feb 17, 2002 at 05:12:55PM -0500, Michael G Schwern wrote:
    On Sun, Feb 17, 2002 at 12:07:44AM -0600, Elaine -HFB- Ashton wrote:
    mkdir requires a mode argument
    The mode argument is optional. Defaults to 0777 (mod your umask).
    The optionality is a relatively recent addition (5.6.0 and later),
    so if we want backward compatibility, we should supply it.

    (Besides, I think the default is silly and a security risk, it assumes
    that your umask is set up okay, but that is another story.)

    --
    $jhi++; # http://www.iki.fi/jhi/
    # There is this special biologist word we use for 'stable'.
    # It is 'dead'. -- Jack Cohen

    --bajehlplihfghhdlfmgd--
    ReSent-Date: Fri, 1 Mar 2002 20:18:17 -0800 (PST)
    ReSent-From: Ask Bjoern Hansen <ask@perl.org>
    ReSent-To: <cpan-workers@perl.org>
    ReSent-Subject: Re: makepmdist
    ReSent-Message-ID: <20020301201817.S38173@onion.valueclick.com>
    On Sun, Feb 17, 2002 at 05:12:55PM -0500, Michael G Schwern wrote:
    On Sun, Feb 17, 2002 at 12:07:44AM -0600, Elaine -HFB- Ashton wrote:
    mkdir requires a mode argument
    The mode argument is optional. Defaults to 0777 (mod your umask).
    The optionality is a relatively recent addition (5.6.0 and later),
    so if we want backward compatibility, we should supply it.

    (Besides, I think the default is silly and a security risk, it assumes
    that your umask is set up okay, but that is another story.)

    --
    $jhi++; # http://www.iki.fi/jhi/
    # There is this special biologist word we use for 'stable'.
    # It is 'dead'. -- Jack Cohen

    --bajehlplihfghhdlfmgd--

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcpan-workers @
categoriesperl
postedFeb 16, '02 at 6:41p
activeMar 2, '02 at 4:18a
posts5
users5
websitecpan.org

People

Translate

site design / logo © 2021 Grokbase