Hi Nahuel, 2009/5/6 Joe Atzberger <[email protected]>: > On Wed, May 6, 2009 at 6:26 AM, Nahuel ANGELINETTI > <[email protected]> wrote: >> >> + if ( !$left || $left eq '' ) { > > That test is no different than: > if (!$left)... > > That is, the second part of the conditional will never be evaluated true, > since empty string evaluates to false and "! FALSE" will have already proven > true on the first part. > > You can confirm with: > perl -e 'my $x = ""; print ($x ? "yes\n" : "no\n");'
I've gone ahead and pushed the patch since it does correct a discrepancy in the budget display and is useful in HEAD even before new_acq is available, but Joe's correct that 'if ( !$left || $left eq '' )' could simply be stated as 'if ( !$left )'. Please consider cleaning up this construct in C4/Bookfund.pm and acqui/bookfund.pl. Regards, Galen -- Galen Charlton VP, Research & Development, LibLime [email protected] p: 1-888-564-2457 x709 skype: gmcharlt _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
