App-Module-Setup

 view release on metacpan or  search on metacpan

lib/App/Module/Setup.pm  view on Meta::CPAN

    my $tpldir = "templates/". $options->{template};
    my $mod = $options->{module};

    # Replacement variables
    my $vars =
      { "module.name"     => $mod,	# Foo::Bar
	"module.version"  => "0.01",
	"module.summary"  => $options->{summary} || $mod,
	"module.license"  => $options->{license} || "perl_5",
	"current.year"    => $options->{year} || 1900 + (localtime)[5],
	"author.name"     => $options->{author} || (getpwuid($<))[6],
	"author.email"    => $options->{email},
	"author.cpanid"   => $options->{cpanid},
	"author.githubid" => $options->{githubid},
	"perl.minversion" => $options->{minperl} || '5.008000',
      };

    my $dir;
    if ( $options->{'install-templates'} ) {
	$dir = $tpldir;
    }

lib/App/Module/Setup.pm  view on Meta::CPAN

C<main> is the only method you should need to use from outside this
module; all the other methods are called internally by this one.

This method creates the distribution and populates it with the all the
requires files.

It takes a reference to a hash of params, as follows:

    module       # module to create in distro
    version      # initial version
    author       # author's full name (taken from C<getpwuid> if not provided)
    email        # author's email address
    verbose      # bool: print progress messages; defaults to 0
    template     # template set to use
    postcmd	 # array ref of commands to execute after creating
    install-templates # bool: just install the selected templates
    minperl	 # minimal perl version, e.g. 5.010000
    license	 # e.g. perl_5

=cut



( run in 0.412 second using v1.01-cache-2.11-cpan-8d75d55dd25 )