Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

simplified HashStore helper

  • Loading branch information...
commit 9c169aa3004a4534046d171b8ddcc800a25e2098 1 parent 98b100f
Joel Berger authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/Moodule/Build/Base.pm
6 lib/Moodule/Build/Base.pm
View
@@ -7,7 +7,7 @@ use Moodule::Build::HashStore;
sub HashStore {
my $name = shift or croak "Must specify the name of the HashStore";
- my ($default) = @_;
+ my $default = @_ ? shift : {};
if ($default && ref $default ne 'HASH') {
croak "HashStore default must be a hash reference";
}
@@ -21,9 +21,7 @@ sub HashStore {
return $_[0] if eval{ $_[0]->isa('Moodule::Build::HashStore') };
return Moodule::Build::HashStore->new( data => $_[0] );
},
- default => $default
- ? sub { Moodule::Build::HashStore->new( data => $default ) }
- : sub { Moodule::Build::HashStore->new },
+ default => sub { Moodule::Build::HashStore->new( data => $default ) },
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.