[Koha-bugs] [Bug 6679] Fixing code so it passes basic Perl::Critic tests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 26 21:44:42 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6679

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Pushed to Master            |In Discussion

--- Comment #222 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
I reverted this patchset. It completely broke Koha.
I'm not sure why it wasn't catched by people who tested it, but my first guess
is Perl version, because the semantics for 'eval' might change from one version
to another. I haven't checked it on Perl changes.

The page for eval [1] states that this two lines have different semantic
meanings:

 - eval $x;     # CASE 1
 - eval { $x }; # CASE 4

which is one of the changes made in several places (notably breaks
C4/Installer/PerlDependencies.pm and C4/Dates.pm)

I'll mark it failed QA. My first guess is that we should be either rewriting
the hash -> arrayref trick into using anonymous subroutines to do the job, or
even refactoring the whole thing (or removing it).

[1] http://perldoc.perl.org/functions/eval.html

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list