https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20103
--- Comment #5 from M. Tompsett <[email protected]> --- (In reply to Jonathan Druart from comment #4) > I do not understand the quote like you. > It says it is faster and we should not "use" it, in the sense we should not > write > use Readonly::XS; > but > use Readonly; > instead. > > To me it makes sense to keep it in the dependency list (until Readonly is > removed, bug 16588). >From Readonly.pm 18 # These functions may be overridden by Readonly::XS, if installed. 19 use vars qw/$XSokay/; # Set to true in Readonly::XS, if available 20 21 # For perl 5.8.x or higher 22 # These functions are exposed in perl 5.8.x (Thanks, Leon!) 23 # They may be overridden by Readonly::XS, if installed on old perl versions 24 if ($] < 5.008) { # 'Classic' perl 25 *is_sv_readonly = sub ($) {0}; 26 *make_sv_readonly 27 = sub ($) { die "make_sv_readonly called but not overridden" }; 28 29 # See if we can use the XS stuff. 30 $Readonly::XS::MAGIC_COOKIE 31 = "Do NOT use or require Readonly::XS unless you're me."; 32 eval 'use Readonly::XS'; 33 } 34 else { # Modern perl doesn't need Readonly::XS 35 *is_sv_readonly = sub ($) { Internals::SvREADONLY($_[0]) }; 36 *make_sv_readonly 37 = sub ($) { Internals::SvREADONLY($_[0], 1) }; 38 $XSokay = 1; # We're using the new built-ins so this is a white lie 39 } -- 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/
