Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2868/lib/Module/Build
Modified Files:
Base.pm
Log Message:
Revert change to split_like_shell() method, and have read_modulebuildrc() returns a empty hash if the file isn't found or there are no matching actions.
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.402
retrieving revision 1.403
diff -u -d -r1.402 -r1.403
--- Base.pm 31 Mar 2005 04:48:17 -0000 1.402
+++ Base.pm 31 Mar 2005 06:03:08 -0000 1.403
@@ -1178,10 +1178,10 @@
sub read_modulebuildrc {
my( $self, $action ) = @_;
- return unless exists( $ENV{HOME} ) && -e $ENV{HOME};
+ return {} unless exists( $ENV{HOME} ) && -e $ENV{HOME};
my $modulebuildrc = File::Spec->catfile( $ENV{HOME}, '.modulebuildrc' );
- return unless -e $modulebuildrc;
+ return {} unless -e $modulebuildrc;
my $fh = IO::File->new( $modulebuildrc )
or die "Can't open $modulebuildrc: $!";
@@ -1209,10 +1209,10 @@
$options{$action} .= $options . ' ';
}
- my @args = $self->split_like_shell( $options{'*'}, $options{$action} );
+ my @args = $self->split_like_shell( "$options{'*'} $options{$action}" );
my( $args ) = $self->read_args( @args );
- return $args;
+ return defined( $args ) ? $args : {};
}
sub merge_args {
@@ -2626,9 +2626,7 @@
}
sub split_like_shell {
- my ($self, @strings) = @_;
-
- my $string = join( ' ', map {s/\s+$//; $_} @strings );
+ my ($self, $string) = @_;
return () unless defined($string);
return @$string if UNIVERSAL::isa($string, 'ARRAY');
|