Michael G Schwern wrote:



Make sure MakeMaker is told about that script via EXE_FILES or it won't know
to do anything with it (like install it).



Check.  In Makefile.PL, I already had:

         EXE_FILES    => [
                        'scripts/modulemaker',
                    ],


[snip]
Do the same thing you'd do from the command line.

        perl -Mblib xyz.pl -V

which translates into:

        # $^X is the current perl.
        system("$^X -Mblib xyz.pl -V");


This *seems* to be DWIMming:

    system("$^X -Mblib blib/script/xyz.pl -V");

which, wrapped inside a test, becomes:

    ok(! system("$^X -Mblib blib/script/xyz.pl -V"),
        "able to call utility");

Note two things: (1) I had to specify the path from the cwd to the blib version of the utility to get it to work. Simply calling 'xyz.pl' didn't work (error said script could not be found). (2) Though in my directory structure the utility is found in directory 'scripts/' -- and that's how it's listed in Makefile.PL's EXE_FILES key -- in the blib structure it's called 'script/' -- no final 's'.

I suspect I don't yet understand this properly, but since it seems to be working, I'll proceed with testing.

Thanks once again, Michael!

jimk

Reply via email to