Module-Starter
view release on metacpan or search on metacpan
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)
and Email address ( taken from $ENV{EMAIL} if Author's name is not provided )
Format: Author Name <author_email@domain.tld>
This option can be supplied multiple times for projects
that have multiple authors.
--github=login Create links to the author's GitHub issue tracker
--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
lib/Module/Starter.pm view on Meta::CPAN
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 => [ authors ], # author(s) name and email address
# (if not provided, name and email are taken from getpwuid and
# EMAIL respectively)
# format: Author Name <author-email@domain.tld>
github => $username, # author's GitHub user name (for creating links to issue tracker)
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.
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];
$self->{author} = [
exists $ENV{EMAIL}
? "$self->{author} <$ENV{EMAIL}>"
: $self->{author}
] if defined $self->{author};
}
croak "Must specify one or more authors\n"
unless defined $self->{author}
&& ref($self->{author}) eq 'ARRAY'
( run in 0.921 second using v1.01-cache-2.11-cpan-39bf76dae61 )