in reply to Re^2: Build.PL usage during module authoring
in thread Build.PL usage during module authoring

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".

Yes it does, and that is a good thing. Why? Because copying .pl files by default is an often overlooked and most surprising feature of ExtUtils::MakeMaker , new authors just don't expect it, and they forget to check blib

$ md tmp7 $ module-starter --eumm --module=Straypl --author=name --email=e +mail Added to MANIFEST: Changes Added to MANIFEST: ignore.txt Added to MANIFEST: lib/Straypl.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/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 Straypl $ echo print "i'm a stray\n"; 1; > imastray.pl $ perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Straypl $ dmake cp lib/Straypl.pm blib\lib\Straypl.pm cp imastray.pl blib\lib\imastray.pl $ echo print "i'm a stray\n"; 2; > lib\Straypl.pl.pl.pl $ dmake $ perl Makefile.PL Writing Makefile for Straypl $ dmake cp lib/Straypl.pl.pl.pl blib\lib\Straypl.pl.pl.pl Skip blib\lib\Straypl.pm (unchanged) Skip blib\lib\imastray.pl (unchanged)

If you want Module::Build to do the same, you'll have to be proactive, one way is Module::Build::Cookbook#Adding new file types to the build process.

Also, consider Module::Build::API#share_dir or AutoSplit

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

Replies are listed 'Best First'.
Re^4: Build.PL usage during module authoring
by John M. Dlugosz (Monsignor) on May 13, 2011 at 02:53 UTC
    >> 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.