[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.508,1.509
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-10-25 20:26:16
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17188/lib/Module/Build Modified Files: Base.pm Log Message: Fix accursed test to check for $node->{$name} rather than $node->{name}; check that it is both defined and non-empty; and make the failure message look like an error. Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.508 retrieving revision 1.509 diff -u -d -r1.508 -r1.509 --- Base.pm 24 Oct 2005 15:45:19 -0000 1.508 +++ Base.pm 25 Oct 2005 20:26:01 -0000 1.509 @@ -2834,8 +2834,10 @@ foreach (qw(dist_name dist_version dist_author dist_abstract license)) { (my $name = $_) =~ s/^dist_//; $node->{$name} = $self->$_(); - die "Missing required field '$name' for META.yml\n" unless length($node->{name}); + die "ERROR: Missing required field '$name' for META.yml\n" + unless defined($node->{$name}) && length($node->{$name}); } + if (defined( $self->license ) && defined( my $url = $self->valid_licenses->{ $self->license } )) { $node->{resources}{license} = $url; |