In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ddce084af02764d4f30ef6089ae67a7983fcc690?hp=dec5203ab08acacda6ed98fd23a8dc4e5b190239>
- Log ----------------------------------------------------------------- commit ddce084af02764d4f30ef6089ae67a7983fcc690 Author: Father Chrysostomos <[email protected]> Date: Sun Feb 8 12:45:12 2015 -0800 Remove get-magic from $/ and use a different approach to prevent $/ from being set to a bad value. This should fix ticket #123739. Commit v5.21.8-197-g5fe499a made $/âs get-magic read PL_rs, so that the croak when setting $/ to a bad value would not leave $/ with that bad value, in order to fix bug #123218. Some CPAN modules do not like $/ reading PL_rs that way. So we have to change this back. I am not actually removing the get- magic, but just making it a no-op, as it was before. The set- magic now sets $/ back to its previous value before croaking. ----------------------------------------------------------------------- Summary of changes: mg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mg.c b/mg.c index 237b404..d2a8db0 100644 --- a/mg.c +++ b/mg.c @@ -1103,9 +1103,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) sv_setiv(sv, (IV)IoPAGE(GvIOp(PL_defoutgv))); break; case ':': - break; case '/': - sv_setsv(sv, PL_rs); break; case '[': sv_setiv(sv, 0); @@ -2869,6 +2867,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) ); } } else { + sv_setsv(sv, PL_rs); /* diag_listed_as: Setting $/ to %s reference is forbidden */ Perl_croak(aTHX_ "Setting $/ to a%s %s reference is forbidden", *reftype == 'A' ? "n" : "", reftype); -- Perl5 Master Repository
