[Koha-bugs] [Bug 7821] XSLT systempreference multi-language support

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 3 03:42:17 CEST 2012


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

--- Comment #17 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
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.


More information about the Koha-bugs mailing list