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

--- Comment #17 from Srdjan Jankovic <[email protected]> ---
Comment on attachment 8725
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8725
Followup for current language call

() fixes it because _current_language is not a declared symbol, so perl treats
it as a bareword, and strict barfs when compiling. _current_language() is a
function call, so gets resolved at runtime (C and Java people hate that).
C4::Templates::_current_language() exists, so it gets executed.

So if you had in C4::Templates (which I thoroughly not recommend)

sub _current_language () {
    return $_current_language;
}

C4::Templates::_current_language would have worked, () prototypes the function
and makes it a symbol.

That's why people use constant;

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to