Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
There's more than one way to do things
 
PerlMonks  

Re^2: What's the best way to handle the installation and or distribution of a Perl script?

by taint (Hermit)
on Nov 24, 2013 at 23:47 UTC ( #1064162=note: print w/ replies, xml ) Need Help??


in reply to Re: What's the best way to handle the installation and or distribution of a Perl script?
in thread What's the best way to handle the installation and or distribution of a Perl script?

Merci pour tes mots gentils, Laurent_R.
I hope I stated that properly. :)

My current thoughts on this is (given the script contains POD), is to copy all of the documentation from it into a Perl Module. Then simply following the normal course of creating, and distributing a Perl Module. So the final results being: somescript.pl
SomeScript.pm
I already have a Makefile.PL to do that. But thought I'd wait to post it. To see what other thoughts, ideas, implementations others had, first.

Merci encore.

--Chris

#!/usr/bin/perl -Tw
use Perl::Always or die;
my $perl_version = (5.12.5);
print $perl_version;


Comment on Re^2: What's the best way to handle the installation and or distribution of a Perl script?
Re^3: What's the best way to handle the installation and or distribution of a Perl script?
by taint (Hermit) on Nov 25, 2013 at 04:58 UTC

    While there indeed are Modules that can perform the task of automating the task of creating a Dist for CPAN. Those that are specific to single utility type Perl scripts are somewhat few, by comparison. Those that do exist, are largely unfinished. In anticipation of releasing a full fledged, and complete Module for the automation of creating, and distributing of either a standard Perl Module, or Perl script(s). I initiated this endevour ~month ago. Searching for documentation, while available. Wasn't where I anticipated it's being, and was a bit chopped up. I then embarked on a search for Modules that either were "how-to's" (POD's, and such), or were complete Automation dists, for the sake of completely automating the task of creating, and pushing your dist to CPAN. As noted earlier, they existed. Those that worked best, were intended for a typical Perl Module. Those for scripts, while could work. Were best suited for those already comfortable using CPAN, and were already relatively seasoned authors.

    So I thought my idea a worthy cause. It was my intention, after completion of the Module, to post an RFC in Meditations. Given that. I'll end much further discussion of it here. In order to keep things in context.

    Given that my original intent was to elicit comments from others on how they would choose to create a dist on CPAN that was meerly a utility type script. I'll post the one I use (Makefile.PL). Hopefully, my submission might elicit the dialog I had hoped for. :)

    use 5.008_005; use strict; use warnings FATAL => 'all'; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'examplescript', AUTHOR => q{Judy Garland <judygarland@wizard.oz>}, VERSION_FROM => 'lib/examplescript.pm', EXE_FILES => ['examplescript'], ABSTRACT_FROM => 'lib/examplescript.pm', LICENSE => 'artistic', PL_FILES => { # examplescript.pl }, MIN_PERL_VERSION => 5.008_005, CONFIGURE_REQUIRES => { 'ExtUtils::MakeMaker' => 0, }, BUILD_REQUIRES => { 'Test::More' => 0, }, PREREQ_PM => { 'File::Spec' => 0, 'Term::ReadLine' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'examplescript-*' }, );
    While I didn't need to also create a examplescript.pm, I chose to, only to provide an additional "help file" (it only contains what would be dumped to the man files -- man.1, and man.3). It also contains a little bonus --
    samplescript.pm exports nothing. Perhaps you're looking for the script examplescript(.pl) try perldoc examplescript for more information.
    Anyway, it does the job quite adequately, and will/would pass the "smoke" test(s) on cpantesters.

    That's all for now. :)

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1064162]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (19)
As of 2014-04-16 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (430 votes), past polls