Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9005/lib/Module/Build
Modified Files:
Tag: release-0_26_branch
Base.pm
Log Message:
Integrate from mainline (was overlooked for the last release)
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.340.2.27
retrieving revision 1.340.2.28
diff -u -d -r1.340.2.27 -r1.340.2.28
--- Base.pm 10 Mar 2005 04:50:13 -0000 1.340.2.27
+++ Base.pm 18 Mar 2005 16:22:58 -0000 1.340.2.28
@@ -60,10 +60,8 @@
# XXX Read the META.yml and see whether we need to run the Build.PL
# Run the Build.PL
- $package->run_perl_script('Build.PL');
- my $self = $package->resume;
- $self->merge_args(undef, %args);
- return $self;
+ $package->run_perl_script('Build.PL', [], [$package->unparse_args(\%args)]);
+ return $package->resume;
}
sub current {
@@ -723,6 +721,7 @@
next unless -e $self->config_file($_);
$self->_persistent_hash_restore($_);
}
+ $self->has_config_data(1) if keys(%{$self->config_data}) || keys(%{$self->feature});
}
sub _write_dumper {
@@ -1126,6 +1125,17 @@
return $args, @ARGV;
}
+sub unparse_args {
+ my ($self, $args) = @_;
+ my @out;
+ while (my ($k, $v) = each %$args) {
+ push @out, (UNIVERSAL::isa($v, 'HASH') ? map {+"--$k", "$_=$v->{$_}"} keys %$v :
+ UNIVERSAL::isa($v, 'ARRAY') ? map {+"--$k", $_} @$v :
+ ("--$k", $v));
+ }
+ return @out;
+}
+
sub args {
my $self = shift;
return wantarray ? %{ $self->{args} } : $self->{args} unless @_;
|