Module-Starter

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          This changes the default behaviour, as fatal warnings are now considered
          unwise for any public module that many others depend on.
          See: http://blogs.perl.org/users/peter_rabbitson/2014/01/fatal-warnings-are-a-ticking-time-bomb-via-chromatic.html

1.62    Sun Dec  8 11:49:21 2013
        * Fix regexp in tests to stop failing on 5.8.x (Sawyer X).
        * Fix FSF address in template block and tests (Brian Manning).
        * Typo fixes (David Steinbrunner).

1.61    Fri Dec  6 14:01:19 2013
        * Stop getpwuid calls on Windows, instead prompt user for author.
          (Martin McGrath)

1.60    Thu Oct 25 20:29:50 2012
        * Guess author from getpwuid if not provided (Hilko Bengen).
        * Guess email from $ENV{'EMAIL'} if not provided (Hilko Bengen).

1.59    Thu Oct 25 19:54:05 2012
        * Skip POD tests unless RELEASE_TESTING environment is on.
          (Alberto Simoes)

1.58_03 Fri May 11 16:24:44 2012
        -- Trying to clean up test failures. More to come.

1.58_02 Wed Apr 25 12:53:34 2012

bin/module-starter  view on Meta::CPAN


    --module=module  Module name (required, repeatable)
    --distro=name    Distribution name (optional)
    --dir=dirname    Directory name to create new module in (optional)

    --builder=module Build with 'ExtUtils::MakeMaker' or 'Module::Build'
    --eumm           Same as --builder=ExtUtils::MakeMaker
    --mb             Same as --builder=Module::Build
    --mi             Same as --builder=Module::Install (discouraged)

    --author=name    Author's name (taken from getpwuid if not provided)
    --email=email    Author's email (taken from EMAIL if not provided)

    --ignores=type   Ignore type files to include (repeatable)
    --license=type   License under which the module will be distributed
                     (default is artistic2)
    --genlicense     Generate LICENSE file according to specified license
    --minperl=ver    Minimum Perl version required (optional;
                     default is 5.006)

    --fatalize       Generate code that causes all warnings to be fatal with:

lib/Module/Starter.pm  view on Meta::CPAN

It takes a hash of params, as follows:

    distro       => $distroname,      # distribution name (defaults to first module)
    modules      => [ module names ], # modules to create in distro
    dir          => $dirname,         # directory in which to build distro
    builder      => 'Module::Build',  # defaults to ExtUtils::MakeMaker
                                      # or specify more than one builder in an
                                      # arrayref

    license      => $license,  # type of license; defaults to 'artistic2'
    author       => $author,   # author's full name (taken from C<getpwuid> if not provided)
    email        => $email,    # author's email address (taken from C<EMAIL> if not provided)
    ignores_type => $type,     # ignores file type ('generic', 'cvs', 'git', 'hg', 'manifest' )
    fatalize     => $fatalize, # generate code that makes warnings fatal

    verbose      => $verbose,  # bool: print progress messages; defaults to 0
    force        => $force     # bool: overwrite existing files; defaults to 0

The ignores_type is a new feature that allows one to create SCM-specific ignore files.
These are the mappings:

lib/Module/Starter/Simple.pm  view on Meta::CPAN


    my $self    = $either;
    my $modules = $self->{modules} || [];
    my @modules = map { split /,/ } @{$modules};
    croak "No modules specified.\n" unless @modules;
    for (@modules) {
        croak "Invalid module name: $_" unless /\A[a-z_]\w*(?:::[\w]+)*\Z/i;
    }

    if ( ( not $self->{author} ) && ( $^O ne 'MSWin32' ) ) {
        ( $self->{author} ) = split /,/, ( getpwuid $> )[6];
    }

    if ( not $self->{email} and exists $ENV{EMAIL} ) {
        $self->{email} = $ENV{EMAIL};
    }

    croak "Must specify an author\n" unless $self->{author};
    croak "Must specify an email address\n" unless $self->{email};
    ($self->{email_obfuscated} = $self->{email}) =~ s/@/ at /;



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