develooper Front page | | Postings from November 2012

The get_options Argument to new()

John M. Gamble
November 16, 2012 16:53
The get_options Argument to new()
Message ID:
I managed to get around this using the args() method, so this isn't a
critical problem. But I was wondering if I used the get_options argument

What I had was:

my $test_all = 0;

my $build = Module::Build->new(
my $build = $class->new(

	license => 'perl',

	get_options => {
		Testall => {store => \$test_all},
#... etc.


It creates the Build file correctly, but when I try the command

Build test --Testall

I get the error message

Modification of a read-only value attempted at
C:/Perl64/lib/Getopt/ line 561.

Is this an error in Module::Build handling or an error on my part?

I'm using Activestate perl v5.14.1 built for MSWin32-x64-multi-thread, and
version 2.38 of Getopt-Long.

     -john Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About