[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.530,1.531
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-11-30 10:47:41
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17112/lib/Module/Build Modified Files: Base.pm Log Message: Some fixes against Perl version 5.005_03. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.530 retrieving revision 1.531 diff -u -d -r1.530 -r1.531 --- Base.pm 29 Nov 2005 05:18:40 -0000 1.530 +++ Base.pm 30 Nov 2005 10:47:33 -0000 1.531 @@ -7,7 +7,7 @@ use File::Find (); use File::Path (); use File::Basename (); -use File::Spec (); +use File::Spec 0.82 (); use File::Compare (); use Data::Dumper (); use IO::File (); @@ -943,8 +943,8 @@ my $self = shift; my %prereqs; foreach my $type ( @{ $self->prereq_action_types } ) { - if ( $self->can( $type ) ) { - my $prereq = $self->$type || {}; + if ( my $sub = $self->can( $type ) ) { + my $prereq = $self->$type() || {}; $prereqs{$type} = $prereq if %$prereq; } } @@ -1292,11 +1292,15 @@ $args->{$k} = $v->{default} if exists $v->{default}; } + local @ARGV = @_; # No other way to dupe Getopt::Long + # Get the options values and return them. # XXX Add option to allow users to set options? - Getopt::Long::Configure('pass_through'); - local @ARGV = @_; # No other way to dupe Getopt::Long - Getopt::Long::GetOptions($args, @specs); + if ( @specs ) { + Getopt::Long::Configure('pass_through'); + Getopt::Long::GetOptions($args, @specs); + } + return $args, @ARGV; } |