in reply to Build.PL usage during module authoring

Can someone fill me in on what's (not) going on?

I say, someone is playing a practical joke on you, they're remote controlling your terminal :)

shell commands

md tmp6 cd tmp6 module-starter --mb --module=MyProject --author=name --email=email cd MyProject md lib\MyProject echo package MyProject::1; 1; > lib\MyProject\1.pm perl Build.PL perl Build perl Build test tree.exe blib pmvers Module::Starter Module::Build Test::Pod::Coverage md lib\Path echo package Path::Name; 1; > lib\Path\Name.pm perl Build perl Build test tree.exe blib more MANIFEST perl Build disttest perl Build manifest perl Build disttest cd .. cd .. rm -rf tmp6

shell session

first part
$ md tmp6 $ cd tmp6 $ module-starter --mb --module=MyProject --author=name --email=email Added to MANIFEST: Build.PL Added to MANIFEST: Changes Added to MANIFEST: ignore.txt Added to MANIFEST: lib/MyProject.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 starter directories and files $ cd MyProject $ md lib\MyProject $ echo package MyProject::1; 1; > lib\MyProject\1.pm $ perl Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'MyProject' version '0.01' $ perl Build Building MyProject $ perl Build test t\00-load.t ....... 1/1 # Testing MyProject 0.01, Perl 5.012002, C:\pe +rl\512~1.2\bin\MSWIN3~1\perl.exe t\00-load.t ....... ok t\boilerplate.t ... ok t\manifest.t ...... skipped: Author tests not required for installatio +n t\pod-coverage.t .. 1/2 # Failed test 'Pod coverage on MyProject::1' # at C:/perl/site/5.12.2/lib/Test/Pod/Coverage.pm line 126. # MyProject::1: couldn't find pod # Looks like you failed 1 test of 2. t\pod-coverage.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/2 subtests t\pod.t ........... ok Test Summary Report ------------------- t\pod-coverage.t (Wstat: 256 Tests: 2 Failed: 1) Failed test: 2 Non-zero exit status: 1 Files=5, Tests=8, 1 wallclock secs ( 0.14 usr + 0.03 sys = 0.17 CPU +) Result: FAIL Failed 1/5 test programs. 1/8 subtests failed. $ tree.exe blib blib |-- arch `-- lib |-- MyProject | `-- 1.pm `-- MyProject.pm 3 directories, 2 files
using
$ pmvers Module::Starter Module::Build Test::Pod::Coverage Module::Starter: 1.57 Module::Build: 0.38 Test::Pod::Coverage: 1.08
then add another, still no problems
$ md lib\Path $ echo package Path::Name; 1; > lib\Path\Name.pm $ perl Build Building MyProject $ perl Build test t\00-load.t ....... 1/1 # Testing MyProject 0.01, Perl 5.012002, C:\pe +rl\512~1.2\bin\MSWIN3~1\perl.exe t\00-load.t ....... ok t\boilerplate.t ... ok t\manifest.t ...... skipped: Author tests not required for installatio +n t\pod-coverage.t .. 1/3 # Failed test 'Pod coverage on MyProject::1' # at C:/perl/site/5.12.2/lib/Test/Pod/Coverage.pm line 126. # MyProject::1: couldn't find pod # Failed test 'Pod coverage on Path::Name' # at C:/perl/site/5.12.2/lib/Test/Pod/Coverage.pm line 126. # Path::Name: couldn't find pod # Looks like you failed 2 tests of 3. t\pod-coverage.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/3 subtests t\pod.t ........... ok Test Summary Report ------------------- t\pod-coverage.t (Wstat: 512 Tests: 3 Failed: 2) Failed tests: 2-3 Non-zero exit status: 2 Files=5, Tests=10, 1 wallclock secs ( 0.06 usr + 0.02 sys = 0.08 CP +U) Result: FAIL Failed 1/5 test programs. 2/10 subtests failed. $ tree.exe blib blib |-- arch `-- lib |-- MyProject | `-- 1.pm |-- MyProject.pm `-- Path `-- Name.pm 4 directories, 3 files
oh look, not in manifest, this would probably break disttest
$ more MANIFEST Build.PL Changes lib/MyProject.pm MANIFEST This list of files README t/00-load.t t/manifest.t t/pod-coverage.t t/pod.t
oh look, it does break disttest
$ perl Build disttest Creating Makefile.PL Module::Build was not found in configure_requires! Adding it now automatically as: configure_requires => { 'Module::Build' => 0.38 } Created META.yml and META.json Creating MyProject-0.01 Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'MyProject' version '0.01' Building MyProject t\00-load.t ....... 1/1 # Testing MyProject 0.01, Perl 5.012002, C:\pe +rl\512~1.2\bin\MSWIN3~1\perl.exe t\00-load.t ....... ok t\manifest.t ...... skipped: Author tests not required for installatio +n t\pod-coverage.t .. ok t\pod.t ........... ok All tests successful. Files=4, Tests=3, 0 wallclock secs ( 0.06 usr + 0.05 sys = 0.11 CPU +) Result: PASS
add to manifest and disttest again
$ perl Build manifest File 'MANIFEST.SKIP' does not exist: Creating a temporary 'MANIFEST.SK +IP' Added to MANIFEST: ignore.txt Added to MANIFEST: lib/MyProject/1.pm Added to MANIFEST: lib/Path/Name.pm Added to MANIFEST: t/boilerplate.t $ perl Build disttest Creating Makefile.PL Module::Build was not found in configure_requires! Adding it now automatically as: configure_requires => { 'Module::Build' => 0.38 } Created META.yml and META.json Creating MyProject-0.01 Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'MyProject' version '0.01' Building MyProject t\00-load.t ....... 1/1 # Testing MyProject 0.01, Perl 5.012002, C:\pe +rl\512~1.2\bin\MSWIN3~1\perl.exe t\00-load.t ....... ok t\boilerplate.t ... ok t\manifest.t ...... skipped: Author tests not required for installatio +n t\pod-coverage.t .. 1/3 # Failed test 'Pod coverage on MyProject::1' # at C:/perl/site/5.12.2/lib/Test/Pod/Coverage.pm line 126. # MyProject::1: couldn't find pod # Failed test 'Pod coverage on Path::Name' # at C:/perl/site/5.12.2/lib/Test/Pod/Coverage.pm line 126. # Path::Name: couldn't find pod # Looks like you failed 2 tests of 3. t\pod-coverage.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/3 subtests t\pod.t ........... ok Test Summary Report ------------------- t\pod-coverage.t (Wstat: 512 Tests: 3 Failed: 2) Failed tests: 2-3 Non-zero exit status: 2 Files=5, Tests=10, 0 wallclock secs ( 0.06 usr + 0.01 sys = 0.08 CP +U) Result: FAIL Failed 1/5 test programs. 2/10 subtests failed. Error executing 'Build test' in dist directory at C:/perl/5.12.2/lib/M +odule/Build/Base.pm line 4087.

Replies are listed 'Best First'.
Re^2: Build.PL usage during module authoring
by John M. Dlugosz (Monsignor) on May 13, 2011 at 01:41 UTC
    All I got out of that was that you run perl Build again.

    I can delete blib, and running perl Build will make it reappear. It contains the main .pm file, but not the other files I have in the original lib directory, even though the one I'm interested in is named in the Manifest.

    Maybe it only copies files with a .pm extension? Your example added another module to the tree, not an internal file that would be "required".

        >> Oh, and now is a good time to review How do I post a question effectively? :)

        I did say “But I added another file in the same directory as the .pm file, that is "required" by the code at run time”. I did not say that I was adding another module to the distribution; it was "some file", and although I didn't spell it out, it should have been clear that whatever it was, it was not a .pm file.

        So maybe you can stop hiding behind Anonymous, and perhaps read a little more closely and answer what was asked. Or be a little more polite with pointing out that the root of the problem wasn't as explicit as it could have been (after all, had I know it was significant I would have known what to look for!!) rather than treating a 10-year PM veteran like a noob.