develooper Front page | perl.module.build | Postings from November 2012

The get_options Argument to new()

From:
John M. Gamble
Date:
November 16, 2012 16:53
Subject:
The get_options Argument to new()
Message ID:
366b67987ecdb3431ff5c8ed65b37b37.squirrel@webmail.ripco.com
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
incorrectly.

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.
);

$build->create_build_script;

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/Long.pm 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.

Thanks,
     -john





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About