Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Here's my revamp of simonflk's utility rolling in D&P's compact stuff:

STANDARD COMPACT USAGE:

$> newmodule -name Foo::Bar -version 0.01 -compact 1
$> newmodule -n Foo::Bar -v 0.01 -c 1
COMPACT USAGE WITH VERSION # IN FOLDER NAME:
$> newmodule -name Foo::Bar -version 0.01 -compact 2
$> newmodule -n Foo::Bar -v 0.01 -c 2
$> newmodule -n Foo::Bar -v 0.01 (My Default Setting)
DEFAULT FOLDER NAMING USAGE:
$> newmodule -name Foo::Bar -version 0.01 -compact 0
$> newmodule -n Foo::Bar -v 0.01 -c 0
#!/usr/bin/perl use strict; use warnings; use Getopt::Long; use ExtUtils::ModuleMaker 0.204; my %author = ( NAME => 'Christopher Baker', EMAIL => 'ignatz@ignatzmouse.com', # CPANID => 'IGNATZ', Someday *SIGH* WEBSITE => 'http://www.ignatzmouse.com' ); # Set some defaults my $license = 'perl'; my $version = '0.01'; my $module_name = ''; my $compact = 2; my $extra_modules = ''; my @extra_modules = (); GetOptions ( 'name=s' => \$module_name, 'version:f' => \$version, 'license:s' => \$license, 'extra:s' => \$extra_modules, 'compact:i' => \$compact ); Usage() unless $module_name; ###################################################################### +######### # Now make the module ###################################################################### +######### push @extra_modules, {NAME => $_, ABSTRACT => $_} for split /,/, $extra_modules; Generate_Module_Files ( NAME => $module_name, ABSTRACT => $module_name, AUTHOR => \%author, VERSION => $version, LICENSE => $license, compact => $compact, # Module uses wrong option case, not C +OMPACT EXTRA_MODULES => \@extra_modules ); if ($compact == 2) { my $dir_name = $module_name; $dir_name =~ s/::/-/g; print STDERR "renaming '$dir_name' to '$dir_name-$version'\n"; rename $dir_name, "$dir_name-$version" or warn "Could not rename '$dir_name' to '$dir_name-$version': + $!"; } sub Usage { my ($prog) = $0 =~ /\/([^\/]+)$/; print <<HELP; $prog - Simple Module Maker Usage: $prog <-name ModuleName> [-version=?] [-extra=?,?] [-license=?] + [-compact=?] Eg: $prog -name My::Module $prog -name My::Module -version 0.11 -extra My::Utils,My::Extra -license perl HELP }
()-()
 \"/
  `                                                     

In reply to Re: Re: ExtUtils::ModuleMaker by ignatz
in thread ExtUtils::ModuleMaker by simonflk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (7)
    As of 2015-07-07 03:13 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (86 votes), past polls