From: Vincent Pit Date: Mon, 30 Jul 2012 15:46:53 +0000 (+0200) Subject: "defined $x ? $x : undef" better written as "$x" X-Git-Tag: release_1.0.10_001~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a88210e4638148305f1ea34b22b4561642627d90;p=p5sagit%2FModule-Metadata.git "defined $x ? $x : undef" better written as "$x" --- diff --git a/lib/Module/Metadata.pm b/lib/Module/Metadata.pm index 8af7984..10c8e68 100644 --- a/lib/Module/Metadata.pm +++ b/lib/Module/Metadata.pm @@ -543,7 +543,7 @@ sub _parse_fh { if ( $line =~ /$PKG_REGEXP/o ) { $pkg = $1; push( @pkgs, $pkg ) unless grep( $pkg eq $_, @pkgs ); - $vers{$pkg} = (defined $2 ? $2 : undef) unless exists( $vers{$pkg} ); + $vers{$pkg} = $2 unless exists( $vers{$pkg} ); $need_vers = defined $2 ? 0 : 1; # VERSION defined with full package spec, i.e. $Module::VERSION