in reply to faulty expression prob

I'm not squemish about compound statements, and I like to avoid unnecessary code, but this makes me wince:

return $pkg->{'DIST'} = ( $rh = $pkg->{'RPM_HDR'} and $dist = $rh->tag('DISTRIBUTION') ) ? $dist : $undef;

It should work, but since you need two temporary vars which have to be declared (you do use strict don't you;), then this seems much cleaner:

$pkg->{'DIST'} = undef; my $rh = $pkg->{'RPM_HDR'} or return; my $dist = $rh->tag('DISTRIBUTION') or return; return $pkg->{'DIST'} = $dist;

Probably minutely more efficient to boot.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."