G'day nysus,

"... I'm finally learning how to create a proper Perl module ... Module::Starter along with Damian Conway's plugin for it. ... Can someone please clue me in? Thanks."

The enitre process should be incredibly simple. I don't know if you did something odd initially; or if you're running things from the wrong directories; or something else. I did a complete run to show you what's needed and where all the directories and files are.

ken@ganymede: ~/tmp $ mkdir starting_dir ken@ganymede: ~/tmp $ cd starting_dir ken@ganymede: ~/tmp/starting_dir $ cat ~/.module-starter/config author: Ken Cotterill email: kcott@cpan.org builder: ExtUtils::MakeMaker Module::Build plugins: Module::Starter::PBP template_dir: /Users/ken/.module-starter/PBP ken@ganymede: ~/tmp/starting_dir $ module-starter --module=TestForNysus Added to MANIFEST: Build.PL Added to MANIFEST: Changes Added to MANIFEST: lib/TestForNysus.pm Added to MANIFEST: Makefile.PL Added to MANIFEST: MANIFEST Added to MANIFEST: README Added to MANIFEST: t/00.load.t Added to MANIFEST: t/perlcritic.t Added to MANIFEST: t/pod-coverage.t Added to MANIFEST: t/pod.t Created starter directories and files ken@ganymede: ~/tmp/starting_dir $ ls -al total 0 drwxr-xr-x 3 ken staff 102 Feb 13 17:18 . drwxr-xr-x 6 ken staff 204 Feb 13 17:15 .. drwxr-xr-x 9 ken staff 306 Feb 13 17:18 TestForNysus ken@ganymede: ~/tmp/starting_dir $ cd TestForNysus/ ken@ganymede: ~/tmp/starting_dir/TestForNysus $ ls -al total 20 drwxr-xr-x 9 ken staff 306 Feb 13 17:18 . drwxr-xr-x 3 ken staff 102 Feb 13 17:18 .. -rw-r--r-- 1 ken staff 661 Feb 13 17:18 Build.PL -rw-r--r-- 1 ken staff 110 Feb 13 17:18 Changes -rw-r--r-- 1 ken staff 138 Feb 13 17:18 MANIFEST -rw-r--r-- 1 ken staff 737 Feb 13 17:18 Makefile.PL -rw-r--r-- 1 ken staff 1318 Feb 13 17:18 README drwxr-xr-x 3 ken staff 102 Feb 13 17:18 lib drwxr-xr-x 6 ken staff 204 Feb 13 17:18 t ken@ganymede: ~/tmp/starting_dir/TestForNysus $ perl Makefile.PL && make && make test Checking if your kit is complete... Looks good WARNING: Setting ABSTRACT via file 'lib/TestForNysus.pm' failed at /Users/ken/perl5/perlbrew/perls/perl-5.24.0t/lib/site_perl/5.24.0/ +ExtUtils/MakeMaker.pm line 755. Generating a Unix-style Makefile Writing Makefile for TestForNysus Writing MYMETA.yml and MYMETA.json cp lib/TestForNysus.pm blib/lib/TestForNysus.pm Manifying 1 pod document PERL_DL_NONLAZY=1 "/Users/ken/perl5/perlbrew/perls/perl-5.24.0t/bin/pe +rl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Ha +rness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00.load.t ....... 1/1 # Testing TestForNysus v0.0.1 t/00.load.t ....... ok t/perlcritic.t .... skipped: Author test. To run: set $ENV{CPAN_TEST_A +UTHOR} to a TRUE value. t/pod-coverage.t .. skipped: Author test. To run: set $ENV{CPAN_TEST_A +UTHOR} to a TRUE value. t/pod.t ........... skipped: Author test. To run: set $ENV{CPAN_TEST_A +UTHOR} to a TRUE value. All tests successful. Files=4, Tests=1, 2 wallclock secs ( 0.03 usr 0.01 sys + 0.47 cusr + 0.07 csys = 0.58 CPU) Result: PASS

So, I hadn't edited the module first. The WARNING is because the POD only has the skeleton code:

=head1 NAME TestForNysus -

I added some text for the ABSTRACT:

=head1 NAME TestForNysus - blah blah blah

I find it easier to run make realclean between changes; so, back at the previous directory:

ken@ganymede: ~/tmp/starting_dir/TestForNysus $ make realclean && perl Makefile.PL && make && make test rm -f ... list of files cleaned up ... Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for TestForNysus Writing MYMETA.yml and MYMETA.json cp lib/TestForNysus.pm blib/lib/TestForNysus.pm Manifying 1 pod document PERL_DL_NONLAZY=1 "/Users/ken/perl5/perlbrew/perls/perl-5.24.0t/bin/pe +rl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Ha +rness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00.load.t ....... 1/1 # Testing TestForNysus v0.0.1 t/00.load.t ....... ok t/perlcritic.t .... skipped: Author test. To run: set $ENV{CPAN_TEST_A +UTHOR} to a TRUE value. t/pod-coverage.t .. skipped: Author test. To run: set $ENV{CPAN_TEST_A +UTHOR} to a TRUE value. t/pod.t ........... skipped: Author test. To run: set $ENV{CPAN_TEST_A +UTHOR} to a TRUE value. All tests successful. Files=4, Tests=1, 0 wallclock secs ( 0.03 usr 0.02 sys + 0.45 cusr + 0.05 csys = 0.55 CPU) Result: PASS

I always run the make parts in the same window. I have "set -o vi" in my '.bash_profile", so after the first

make realclean && perl Makefile.PL && make && make test

I just need 3 keystrokes to repeat those 4 commands:

<Esc>k<Enter>

While developing a module, I'd normally have 3 windows open at these directories:

For the make commands
~/tmp/starting_dir/TestForNysus/
For editing TestForNysus.pm
~/tmp/starting_dir/TestForNysus/lib/
For editing *.t files
~/tmp/starting_dir/TestForNysus/t/

— Ken


In reply to Re: Running tests on modules generated by Module::Starter still in /lib directory by kcott
in thread Running tests on modules generated by Module::Starter still in /lib directory by nysus

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, 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.