Code Monkey home page Code Monkey logo

module-starter's Introduction

NAME
    Module::Starter - a simple starter kit for any module

    Module::Starter is used to create a skeletal CPAN distribution,
    including basic builder scripts, tests, documentation, and module code.

    For more information, refer to the documentation for module-starter,
    Module::Starter, and Module::Starter::Simple.

AUTHORS
    Dan Book, "<[email protected]>"

    Sawyer X, "<[email protected]>"

    Andy Lester, "<[email protected]>"

    Ricardo Signes, "<[email protected]>"

    C.J. Adams-Collier, "<[email protected]>"

COPYRIGHT
    Copyright 2004-7 Andy Lester, Ricardo Signes, C.J. Adams-Collier,
    All Rights Reserved.

    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

module-starter's People

Contributors

bessarabov avatar casao avatar chrestomanci avatar cowens avatar cpanxaoc avatar djerius avatar dsteinbrunner avatar grinnz avatar hobbestigrou avatar karenetheridge avatar martinmcgrath avatar richardpooleedb avatar shlomif avatar tordek avatar xsawyerx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

module-starter's Issues

Attempt to bless into a reference / breaks cas-starter cgiapp-starter [rt.cpan.org #71734]

https://rt.cpan.org/Ticket/Display.html?id=71734

These two don't work with the newest Module::Starter

cgiapp-starter     Module::Starter::Plugin::CGIApp
cas-starter        CGI::Application::Structured::Tools

the last working version is PETDANCE/Module-Starter-1.54.tar.gz

if I go ahead and fix all these error message i get "No modules
specified." for "cgiapp-starter --module=MyCGIAppApp --author=author
--email=email"

please take a look



    --- lib/Module/Starter/Simple.pm~   2011-07-02 05:59:32.000000000 -0700
    +++ lib/Module/Starter/Simple.pm    2011-10-14 01:49:55.578125000 -0700
    @@ -49,7 +49,7 @@

     sub new {
         my $class = shift;
    -    return bless { @_ } => $class;
    +    return bless { @_ } => ref($class) || $class;
     }

     =head1 OBJECT METHODS



    --- lib/Module/Starter/BuilderSet.pm~       2011-07-02
05:59:32.000000000 -0700
    +++ lib/Module/Starter/BuilderSet.pm        2011-10-14
02:01:57.812500000 -0700
    @@ -53,7 +53,7 @@

     sub new {
         my $class = shift;
    -
    +    $class = ref($class) || $class;
         my $self =
           {
            'Module::Build' =>


    --- lib/Module/Starter/Plugin/Template.pm~  2011-07-02
05:59:37.000000000 -0700
    +++ lib/Module/Starter/Plugin/Template.pm   2011-10-14
02:03:53.921875000 -0700
    @@ -43,6 +43,7 @@

     sub new {
         my $class = shift;
    +    $class = ref($class) || $class;
         my $self  = $class->SUPER::new(@_);
         $self->{templates} = { $self->templates };
         $self->{renderer} = $self->renderer;




    --- lib/Module/Starter/Plugin/CGIApp.pm~    2010-03-06
19:01:02.000000000 -0800
    +++ lib/Module/Starter/Plugin/CGIApp.pm     2011-10-14
02:05:09.515625000 -0700
    @@ -64,6 +64,7 @@

     sub new {
         my ( $class, @opts ) = @_;
    +    $class = ref($class) || $class;
         my $self = $class->SUPER::new(@opts);

         $self->{templates} = { $self->templates };

Adding modules to a distribution

Right now Module::Starter can start a module just fine, but it would be much better if it could add modules to an already existing distribution.

Broken on 5.8.8

Yes, I know 5.8.8 is old. But there are a lot folks still using it for various reasons.

In any case, cpan install Module::Starter fails as follows:

  XSAWYERX/Module-Starter-1.71.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load.t ......... 1/4 # Testing Module::Starter 1.71, Perl 5.008008, /usr/bin/perl
t/00-load.t ......... ok
t/BuilderSet.t ...... ok
t/module-starter.t .. skipped: these tests must be completely rewritten
t/pod-coverage.t .... skipped: these tests are for release candidate testing
t/pod.t ............. skipped: these tests are for release candidate testing
t/test-dist.t ....... Added to MANIFEST: Build.PL
Added to MANIFEST: Changes
Added to MANIFEST: ignore.txt
Added to MANIFEST: lib/MyModule/Test.pm
Added to MANIFEST: lib/MyModule/Test/App.pm
Added to MANIFEST: MANIFEST
Added to MANIFEST: README
Added to MANIFEST: t/00-load.t
Added to MANIFEST: t/manifest.t
Added to MANIFEST: t/pod-coverage.t
Added to MANIFEST: t/pod.t
Added to MANIFEST: xt/boilerplate.t
t/test-dist.t ....... 1/5 Added to MANIFEST: Build.PL
Added to MANIFEST: Changes
Added to MANIFEST: ignore.txt
Added to MANIFEST: lib/Book/Park/Mansfield.pm
Added to MANIFEST: lib/Book/Park/Mansfield/Base.pm
Added to MANIFEST: lib/Book/Park/Mansfield/FannyPrice.pm
Added to MANIFEST: lib/JAUSTEN/Utils.pm
Added to MANIFEST: MANIFEST
Added to MANIFEST: README
Added to MANIFEST: t/00-load.t
Added to MANIFEST: t/manifest.t
Added to MANIFEST: t/pod-coverage.t
Added to MANIFEST: t/pod.t
Added to MANIFEST: xt/boilerplate.t
Argument "^E\n\0" isn't numeric in numeric gt (>) at t/test-dist.t line 1392.
Argument "v5.10.1" isn't numeric in numeric gt (>) at t/test-dist.t line 1392.
Use of uninitialized value in split at /home/litt/.cpan/build/Module-Starter-1.71-dl41ct/blib/lib/Module/Starter/Simple.pm line 1386.
Use of uninitialized value in string eq at t/test-dist.t line 1251.
Use of uninitialized value in hash element at t/test-dist.t line 546.
Use of uninitialized value in hash element at t/test-dist.t line 547.
Use of uninitialized value in string eq at t/test-dist.t line 552.
Use of uninitialized value in string eq at t/test-dist.t line 561.
Use of uninitialized value in concatenation (.) or string at t/test-dist.t line 561.
Use of uninitialized value in hash element at t/test-dist.t line 546.
Use of uninitialized value in hash element at t/test-dist.t line 547.
Use of uninitialized value in string eq at t/test-dist.t line 552.
Use of uninitialized value in string eq at t/test-dist.t line 561.
Use of uninitialized value in concatenation (.) or string at t/test-dist.t line 561.
Use of uninitialized value in hash element at t/test-dist.t line 546.
Use of uninitialized value in hash element at t/test-dist.t line 547.
Use of uninitialized value in string eq at t/test-dist.t line 552.
Use of uninitialized value in string eq at t/test-dist.t line 561.
Use of uninitialized value in concatenation (.) or string at t/test-dist.t line 561.
Use of uninitialized value in hash element at t/test-dist.t line 546.
Use of uninitialized value in hash element at t/test-dist.t line 547.
Use of uninitialized value in string eq at t/test-dist.t line 552.
Use of uninitialized value in string eq at t/test-dist.t line 561.
Use of uninitialized value in concatenation (.) or string at t/test-dist.t line 561.
Use of uninitialized value in hash element at t/test-dist.t line 546.
Use of uninitialized value in hash element at t/test-dist.t line 547.
Use of uninitialized value in string eq at t/test-dist.t line 552.
Use of uninitialized value in string eq at t/test-dist.t line 561.
Use of uninitialized value in concatenation (.) or string at t/test-dist.t line 561.
Use of uninitialized value in string eq at t/test-dist.t line 564.
Use of uninitialized value in string eq at t/test-dist.t line 564.
                            # {
                            #   '__srand' => 3215746354,
                            #   'author' => 'n9X1YtoRbqeqE Z7ajhPM',
                            #   'builder' => undef,
                            #   'dir' => 't/data/loop/XteKfuuh',
                            #   'distro' => 'XteKfuuh',
                            #   'email' => '[email protected]',
                            #   'fn' => 't/data/loop/XteKfuuh/Makefile.PL',
                            #   'force' => 0,
                            #   'ignores_type' => [
                            #     'generic',
                            #     'cvs',
                            #     'git',
                            #     'manifest'
                            #   ],
                            #   'license' => undef,
                            #   'minperl' => '5.008001',
                            #   'modules' => [
                            #     'HzChEhFm8bV1UbOHeA6n',
                            #     'lJEeM321bl74',
                            #     'WSx::x',
                            #     'ymWxkK27t1yVRa::cs6qJvknhkNRRyMSuJSP'
                            #   ],
                            #   'verbose' => 0
                            # }
                            # Child (Makefile.PL) exited without calling finalize()

                        #   Failed test 'Makefile.PL'
                        #   at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266.
                        # Child (Set ==> HzChEhFm8bV1UbOHeA6n) exited without calling finalize()

                    #   Failed test 'Set ==> HzChEhFm8bV1UbOHeA6n'
                    #   at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266.
                    # Child (force = 0) exited without calling finalize()

                #   Failed test 'force = 0'
                #   at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266.
                # Child (ignores_type = 0111) exited without calling finalize()

            #   Failed test 'ignores_type = 0111'
            #   at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266.
            # Child (minperl = 5.008001) exited without calling finalize()

        #   Failed test 'minperl = 5.008001'
        #   at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266.
        # Child (license = mozilla) exited without calling finalize()

    #   Failed test 'license = mozilla'
    #   at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266.
No testing template for Makefile.PL at t/test-dist.t line 1033.
        TestParseFile::parse_file_start(TestParseFile=HASH(0x9743790)) called at t/test-dist.t line 1292
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "Makefile.PL", CODE(0x9743754)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("Makefile.PL", CODE(0x9743754)) called at t/test-dist.t line 1295
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "Set ==> HzChEhFm8bV1UbOHeA6n", CODE(0x974c3b8)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("Set ==> HzChEhFm8bV1UbOHeA6n", CODE(0x974c3b8)) called at t/test-dist.t line 1310
        main::run_settest(ARRAY(0x974c52c), HASH(0x974c454)) called at t/test-dist.t line 1428
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "force = 0", CODE(0x974c91c)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("force = 0", CODE(0x974c91c)) called at t/test-dist.t line 1446
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "ignores_type = 0111", CODE(0x9751910)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("ignores_type = 0111", CODE(0x9751910)) called at t/test-dist.t line 1447
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "minperl = 5.008001", CODE(0x955fbb4)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("minperl = 5.008001", CODE(0x955fbb4)) called at t/test-dist.t line 1448
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "license = mozilla", CODE(0x935c620)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("license = mozilla", CODE(0x935c620)) called at t/test-dist.t line 1449
        main::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 261
        Test::Builder::__ANON__() called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        eval {...} called at /usr/lib/perl5/5.8.8/Test/Builder.pm line 266
        Test::Builder::subtest(Test::Builder=HASH(0x91803d4), "builder = ExtUtils::MakeMaker", CODE(0x93638c4)) called at /usr/lib/perl5/5.8.8/Test/More.pm line 771
        Test::More::subtest("builder = ExtUtils::MakeMaker", CODE(0x93638c4)) called at t/test-dist.t line 1450
    # Child (builder = ExtUtils::MakeMaker) exited without calling finalize()

#   Failed test 'builder = ExtUtils::MakeMaker'
#   at t/test-dist.t line 0.
# Looks like you planned 5 tests but ran 3.
# Looks like you failed 1 test of 3 run.
# Looks like your test exited with 9 just after 3.
t/test-dist.t ....... Dubious, test returned 9 (wstat 2304, 0x900)
Failed 3/5 subtests

Test Summary Report
-------------------
t/test-dist.t     (Wstat: 2304 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 9
  Parse errors: Bad plan.  You planned 5 tests but ran 3.
Files=6, Tests=24,  1 wallclock secs ( 0.05 usr  0.33 sys +  0.28 cusr  0.86 csys =  1.52 CPU)
Result: FAIL
Failed 1/6 test programs. 1/24 subtests failed.
make: *** [test_dynamic] Error 9
  XSAWYERX/Module-Starter-1.71.tar.gz
  /usr/bin/make test -- NOT OK

Version info:

This is perl, v5.8.8 built for i686-linux-thread-multi
Linux * 2.6.17-1.2142_FC4.stk16 #1 Tue Jul 18 10:19:55 EDT 2006 i686 GNU/Linux

docs unclear on ignores_type config

From reading the module-starter manpage, it sounds like the correct way to set up --ignores=... in a config file is as:

ignores: git manifest

when it should actually be

ignores_type: git manifest

I couldn't figure out why it wasn't working with just ignores: until I traced the code. I'd suggest clarifying that in the manual page. Thanks!

libmodule-starter-perl: Incomplete default MANIFEST: t/boilerplate.t missing [rt.cpan.org #86558]

https://rt.cpan.org/Ticket/Display.html?id=86558

Hi

This bug has been forwarded from http://bugs.debian.org/711513 reported
by Axel Beckert.

----cut---------cut---------cut---------cut---------cut---------cut-----
Package: libmodule-starter-perl
Version: 1.600+dfsg-2
Severity: normal

When creating a new Module::Build based module, module-starter creates
t/boilerplate.t, but doesn't add it to the MANIFEST:

$ module-starter --module=Foo::Bar --mb --ignore=git --verbose --license=perl --force
Created Foo-Bar
Created Foo-Bar/lib/Foo
Created Foo-Bar/lib/Foo/Bar.pm
Created Foo-Bar/t
Created Foo-Bar/t/pod-coverage.t
Created Foo-Bar/t/pod.t
Created Foo-Bar/t/manifest.t
Created Foo-Bar/t/boilerplate.t
Created Foo-Bar/t/00-load.t
Created Foo-Bar/.gitignore
Created Foo-Bar/Build.PL
Created Foo-Bar/Changes
Created Foo-Bar/README
Added to MANIFEST: Build.PL
Added to MANIFEST: Changes
Added to MANIFEST: lib/Foo/Bar.pm
Added to MANIFEST: MANIFEST
Added to MANIFEST: README
Added to MANIFEST: t/00-load.t
Added to MANIFEST: t/boilerplate.t
Added to MANIFEST: t/manifest.t
Added to MANIFEST: t/pod-coverage.t
Added to MANIFEST: t/pod.t
Created Foo-Bar/MANIFEST
Created starter directories and files
$ cd Foo-Bar
$ perl Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Foo-Bar' version '0.01'
$ ./Build distclean
Cleaning up build files
Cleaning up configuration files
Not in MANIFEST: t/boilerplate.t
MANIFEST appears to be out of sync with the distribution
$ 

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (900, 'testing'), (899, 'testing-proposed-updates'), (600, 'stable'), (500, 'proposed-updates'), (200, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.10-rc4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libmodule-starter-perl depends on:
ii  libpath-class-perl  0.32-1
ii  perl                5.14.2-21

libmodule-starter-perl recommends no packages.

libmodule-starter-perl suggests no packages.

-- no debconf information

----cut---------cut---------cut---------cut---------cut---------cut-----

Thanks in advance,
Salvatore Bonaccorso, Debian Perl Group

Inconsistent version string format

When I use the 3-digit version format for $VERSION (0.0.1, for example), the resulting tarball looks like Foo-Bar-0.0.1.tar.gz. However, the META.json contains "version" : "v0.0.1". This subtle difference causes an issue where MetaCPAN indexes the distribution based on the tarball filename, while FPM uses the META.json information to determine the version, and the end result is FPM cannot construct a proper URL to fetch and build the module.

If you could somehow make it consistent, that would be great. I am using ExtUtil::MakeMaker as builder and perl-Module-Starter-1.71-1.fc22.noarch on Fedora 22.

Default should be Module::Build, not ExtUtils::MakeMaker

This is opinion, so feel free to close if you disagree.

The default builder is currently ExtUtils::MakeMaker. perldoc perlnewmod says:

The module-starter utility is distributed as part of the Module::Starter CPAN package. It creates a directory with stubs of all the necessary files to start a new module, according to recent "best practice" for module development

However I think most agree that Module::Build is the better choice for new modules. Here is Schwern on stackoverflow:

As the maintainer of ExtUtils::MakeMaker, I like to recommend Module::Build because MakeMaker is a horror show and I don't want to maintain it any more. Module::Build is so much better put together.

I found many sources that recommend Module::Builder over ExtUtils::MakeMaker, that was just one.

But as I said this is opinion. I do however find it sad that perldoc perlnewmod indirectly suggests ExtUtils::MakeMaker as a best practice through Module::Starter's default.

Wishlist: Start module with pre-existing .pm

Would it be a great deal of effort to write in the use of a pre-existing .pm file to start a module? I have many I would like to package easily, and module-starter would be the easiest to use; if it would use my pre-existing .pm files.

module-starter --module=Neat::Thing --dir=pkgs --file=mods/lib/Neat/Thing.pm

The .pm would be copied into the package. Whatever is in the .pm could be plugged into the various files in package being started like the version, used modules, and subroutines.

package Neat::Thing;
use v5.10.0;
use strict;
use warnings;

use Exporter qw(import);
use File::ShareDir qw(module_dir);
use String::Util qw(trim);

sub neat_thing {
  ...
}

It might even be able to do nifty things like see the use of File::ShareDir and grab any files in the shared directory and add File::ShareDir::Install where needed. In this case, the shared directory would be mods/lib/auto/Neat/Thing/.

This would make packaging my pre-existing .pm files a lot easier.

Non-optional fatalization of strictures [rt.cpan.org #93023]

https://rt.cpan.org/Ticket/Display.html?id=93023

Module injects fatal warnings all over the place, without the ability to turn it off. At least one of the following needs to take place (in order of least work => best outcome)

*) M::S needs to unamibuously document what it is emitting
*) Needs to provide an option to disable the fatals
*) Needs to provide the option and default it to "no fatals
*) Needs to stop copying the questionable ideas of strictures altogether

More discussion:
http://blogs.perl.org/users/peter_rabbitson/2014/01/fatal-warnings-are-a-ticking-time-bomb-via-chromatic.html
https://rt.cpan.org/Ticket/Display.html?id=93004

Affected pieces of code:
https://metacpan.org/source/XSAWYERX/Module-Starter-1.62/lib/Module/Starter/Simple.pm#L759
https://metacpan.org/source/XSAWYERX/Module-Starter-1.62/lib/Module/Starter/Simple.pm#L808
https://metacpan.org/source/XSAWYERX/Module-Starter-1.62/lib/Module/Starter/Simple.pm#L896
https://metacpan.org/source/XSAWYERX/Module-Starter-1.62/lib/Module/Starter/Simple.pm#L1103
https://metacpan.org/source/XSAWYERX/Module-Starter-1.62/lib/Module/Starter/Simple.pm#L1620

Document and enforce Distribution-Name and Module::Name conventions [rt.cpan.org #66606]

https://rt.cpan.org/Ticket/Display.html?id=66606

Andy,

I've really enjoyed this module since finding it a few years ago.

Even with many years in the Perl community, I wasn't sure how to name
pass arguments to this.  I was so module-centric in my thinking that I
didn't (fully) know what a distribution was.  I had conflated them in my
mind.

I think it would be great to give example command-line examples with
real-world (not symbolic) arguments.

Simple, 1-module distribution:

module-maker --distro=MyCompany-DBI --module=MyCompany::DBI
  equivalent to:
module-maker --module=MyCompany::DBI

More complex, multi-module distribution:

module-maker --distro=MyCompany::Communication
--module=MyCompany::Communication::HTTP,MyCompany::Communication::FTP,MyCompany::Communication::Paper,MyCompany::Communication::Paper::CottonBond,MyCompany::Communication::Paper::HempFiber

In addition, doing a quick naming-convention check (with appropriate
errors) would be helpful and instructive to newbies (and not-so-newbies
like me).

If you like this idea enough to approve it, but don't have time to code
it, let me know.  I'd be happy to submit patches.

Thanks,
Michael

Bad Build.PL built when using --fatalize

Found a small bug on 4.71. When I run this:

Command line

module-starter --mb --module=New::Project--author="Corey Wischmeyer" [email protected] --fatalize

Build.PL

use 5.006;
use strict;
use warnings FATAL => 'all; #notice the missing closing quote. 
use Module::Build;

my $builder = Module::Build->new(
    module_name         => 'New::Project',
    license             => 'artistic_2',
    dist_author         => q{Corey Wischmeyer <[email protected]>},
    dist_version_from   => 'lib/New/Project.pm',
    release_status      => 'stable',
    configure_requires => {
        'Module::Build' => 0,
    },
    build_requires => {
        'Test::More' => 0,
    },
    requires => {
        #'ABC'              => 1.6,
        #'Foo::Bar::Module' => 5.0401,
    },
    add_to_cleanup     => [ 'New-Project-*' ],
    create_makefile_pl => 'traditional',
);

$builder->create_build_script();

The Build.PL appears to work when I fix the syntax.

Module::Starter::Simple::create_t in 1.70 breaks plugins

Prior to 1.70, Module::Starter::Simple::create_t expected the t_guts method to return a hash (as a list).
Now it expects that t_guts return two hashrefs. This breaks all plugins with a t_guts method (including Module::Starter's own Module::Starter::Plugin::Template).

For example, here's my plugins configuration:

plugins: Module::Starter::Simple Module::Starter::Plugin::Template Module::Starter::Plugin::DirStore Module::Starter::Plugin::TT2

I'm now seeing the following error:

% module-starter --module App::acisraw --mi
Can't use string ("perlcritic.t") as a HASH ref while "strict refs" in use at [...]/Module/Starter/Simple.pm line 1086.

Create MANIFEST.SKIP file

While creating a MANIFEST file is okay (as long as it is done via the dist builder), having a MANIFEST.SKIP file is better.

It should be done before the create_MANIFEST is issued, so it takes the SKIP into account.

Also, it should check if the file already exists, not to overwrite any other file.

Custom Licensing

I was wondering if there is an easy way to provide a custom license, or potentially if you could provide a license to use when generating a module.

Generic templates stored in File::ShareDir

Being able to edit the templates in a share directory would allow much easier adapting of Module::Starter. Currently everything is hardcoded and that's very uncomfortable.

File::ShareDir can be used to access the shared directory comfortably.

Put titles and links to support on one line of POD

You could put the titles and urls together to create links to more information on the module.

Note: I change Search CPAN to meta::cpan (line 331) since CPAN is not where the links lead.

=over

=item * L<Foo::Bar on RT, CPAN's request tracker|https://rt.cpan.org/NoAuth/Bugs.html?Dist=Foo-Bar>

=item * L<Foo::Bar on CPAN Ratings|https://cpanratings.perl.org/d/Foo-Bar>

=item * L<Foo::Bar on meta::cpan|https://metacpan.org/release/Foo-Bar>

=back

(You can copy and paste the above into the POD renderer to see how meta::cpan parses the lines.)

I think line 1429 would be...

\=item * L<$module on $title|$link>

Lines 1430 and 1431 could be removed.

This is how it would look with perldoc on my computer:

    *   Foo::Bar on RT, CPAN's request tracker
        <https://rt.cpan.org/NoAuth/Bugs.html?Dist=Foo-Bar>

    *   Foo::Bar on CPAN Ratings
        <https://cpanratings.perl.org/d/Foo-Bar>

    *   Foo::Bar on meta::cpan
        <https://metacpan.org/release/Foo-Bar>

This is the html output (though the links are created with markdown here):

Using force removes the entire module directory

Hi there,

i stumbled upon your module today and tried it out (v1.77). I was surprised by the --force behavior for existing directories. Because it simply removes the given directory completely (with remove_tree from File::Path) and then recreates it. Therefore not only "overwriting" it, but effectively wiping it (and for example an existing .git/ directory as well).

My use case of first writing the source code and then scratching my head on how to create a CPAN distribution may not be the intended use case of your module.

But i was more or less expecting that it would just overwrite files already existing, instead of wiping the entire folder. (That at least also describes the usage output for --force: Delete pre-existing files if needed). In case the target directory already exists, the program advertises the --force option in order to stomp the directory. Which is in some way "descriptive" of what will happen, but not that clear in relation to the consequences. ;)

In my case nothing bad happened, everything was pushed to the remote before i started playing with your module. So i could easily recreate my project.

But i think this behavior should either be documentend/communicated way better or - what i would prefer - should be changed to just delete/overwrite the files, the module actually generates.

This way it would be easy to try out the module, check git diff to see what it was doing and maybe just roll back with git restore -- .. The current behavior makes this impossible.

By changing this, it would also be possible to create a new module from within the folder you want to start, instead from a top-level folder. (e.G.: module-starter --dir=. --module=Some::Module).

create_distro does not return the files created

I do not understand the comment

# XXX: no need to return the files created

in Module::Starter::Simple::create_distro().

I want to write a Module::Starter::Plugin and obviously I want to test the files created if the plugin is active. The most straight forward way is to ask the engine plugin Module::Starter::Simple to provide theses files. Module::Starter::Simple::create_distro() has a lexically scoped variable @files, but its use is unclear because it is not returned by that method?!

Create MANIFEST.SKIP file

Creating a proper MANIFEST file is in the works, but a proper MANIFEST.SKIP file is even better.

Use ExtUtils::Manifest and ExtUtils::MakeMaker have good MANIFEST.SKIP examples. I think Module::Install does something similar if not the same.

Why are the generated tests run under taint mode?

I noticed that the generated tests in the t/ directory has shebang #!perl -T which causes the test t/00-load.t to fail when my module uses Alien::GSL. I get the error:

$ perl -T -I./lib t/00-load.t 
not ok 1 - use My::Module;
#   Failed test 'use My::Module;'
#   at t/00-load.t line 10.
#     Tried to use 'My::Module'.
#     Error:  Insecure dependency in chdir while running with -T switch at /home/hakond/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0/File/Find.pm line 375.
# BEGIN failed--compilation aborted at lib/My/Module.pm line 7.
# Compilation failed in require at t/00-load.t line 10.
# BEGIN failed--compilation aborted at t/00-load.t line 10.

I am not so familiar with taint mode and wonder if it is the tests that should be changed (remove the -T option) or the module Alien::GSL?

Clarify licensing

Issue #6[1] on google code repo is to clarify the licensing of Module::Starter. The attached patch to the original issue by Shlomi Fish adds to the copyright the "GPL version 1 or at your option a later version" and "Artistic Original, 2.0 or at your option a later version."

I personally prefer to put it on GPLv2.0+ or Artistic 2.0+, since GPLv1 is basically a buggy version of GPLv2, nothing more. There's no reason to keep it GPLv1.

This will be done soon, unless anyone opposes.

[1] http://code.google.com/p/module-starter/issues/detail?id=6

Change Default minperl From 5.006 to 5.008.

Change default minperl to '5.008'.

(No diff provided, it's just one change on line 109 in Simple.pm.)

I'm not going to use the age argument, since the difference between 5.6 and 5.8's
end-of-life is a mere five years (see http://www.cpan.org/src/README.html.

But setting a higher minimum does prevent some basic problems. I have been seeing
more newly-created modules with a 5.6 minimum enter CPAN recently, and at the very
least I feel that setting a higher minimum will help reduce Unicode problems and
ensure that tainted data is caught (see http://perldoc.perl.org/perl58delta.html).

(For what it's worth, I was going to argue for a minimum of 5.10, where recursive
regex's were introduced, but... baby steps.)

Need an easy way to add a link to Git/Github

I wanted Metacpan to link to the Github repository which requires a change to Makefile.PL. I couldn't find anything in the documentation about how to add it, so I had to ask on IRC. This is not particularly novice friendly. Is there a less manual way to solve this problem?

I think a simple solution would be to add the sample git/repo links in Makefile.PL but comment the lines out?

Just so it's written down this is the commit where I solved the problem.

libmodule-starter-perl: Wrong default for --license (maybe just a documentation issue) [rt.cpan.org #86557]

https://rt.cpan.org/Ticket/Display.html?id=86557

Hi!

This bug has been forwarded from http://bugs.debian.org/711512

See below for the report by Axel Beckert. Indeed, the default change to
artistic2 was made with the commit
2cc5e2aae3fe45a91b76c1293c87e6e7eb7cc81f[1] the CLI documentation
however reverted back with 6e312fde06d46928ecbb173df47f2dd06847c905[2].

If I start a new module furthermore the Copyright section has:

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.

But perlartistic perldoc says still it's GPL-1 or Artistic dual licensed.

Was the change to artistic2 as default thus inteded? If so, are there
other places which needs to be adjusted (e.g. Copyright text, and CLI).

 [1] https://github.com/xsawyerx/module-starter/commit/2cc5e2aae3fe45a91b76c1293c87e6e7eb7cc81f
 [2] https://github.com/xsawyerx/module-starter/commit/6e312fde06d46928ecbb173df47f2dd06847c905

----cut---------cut---------cut---------cut---------cut---------cut-----

Package: libmodule-starter-perl
Version: 1.600+dfsg-2
Severity: minor

Hi,

the man page module-starter(1p) says:

           --license=type   License under which the module will be distributed
                            (default is the same license as perl)

But a module created without --license option got in its Build.PL file:

    license             => 'Artistic_2_0',

According to the man page as cited above, the value should have been
"perl". So either the documentation is inaccurate or the default value
is wrong.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (900, 'testing'), (899, 'testing-proposed-updates'), (600, 'stable'), (500, 'proposed-updates'), (200, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.10-rc4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libmodule-starter-perl depends on:
ii  libpath-class-perl  0.32-1
ii  perl                5.14.2-21

libmodule-starter-perl recommends no packages.

libmodule-starter-perl suggests no packages.

-- no debconf information

----cut---------cut---------cut---------cut---------cut---------cut-----

Thanks in advance,
Salvatore Bonaccorso, Debian Perl Group

Request: interactive mode

I don't use module-starter often enough to remember all the options, so my new-module workflow invariably starts with module-starter --help :) . Would it be possible to add an interactive mode that would prompt me for the necessary information? (npm init does this, for example.) Thank you for considering this request!

-CXW

Better templating support [rt.cpan.org #12017]

https://rt.cpan.org/Ticket/Display.html?id=12017

Module::Starter is great, very useful but it could be even more useful. Here are some ideas for when a user is using a template directory (and perhaps even an inline template set):

* Where a standard file is missing from the directory (e.g. .cvsignore) then that file is not cretated - currently a 0 byte file of that name is created. I would find this useful because i use subversion and choose to name my ignore files .svnignore rather than .cvsignore
* Where a file is in the template directory but Module::Starter doesn't know about it, the file should just be processed like any other file and just placed in the target directory. (e.g. I can place a MANIFEST.SKIP in my template directory and this will be copied through,  i can add a T::D test into the t/ directory and this will be copied through etc. etc.)

I think by adding these features it will make Module::Starter even more flexible and give fewer people a reason not to use it.

I'm happy to look at providing a patch if you're busy and are upfront about what guidlines i'll have to stick to for the patch to be accepted 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.