How can I make a command-line option available during a Build action?
For example, I want to say:
./Build test --verbose --test_files t/test.t --something
I want test.t to know that --something was supplied on the command line,
but the obvious:
use Module::Build;
my $build = Module::Build->current;
my $something = $build->args('something');
doesn't work. --something isn't in @ARGV either. --verbose is likewise
nowhere to be found, but at least has the desired affect.
Can anyone suggest a solution that could be implemented in an M::B
subclass to make --something visible in a test script when running the
test action? I've tried looking through the M::B code but the
command-line arg handling is just way too obfuscated for me to figure
out where to 'patch into' the system, so to speak.
Cheers,
Sendu.