gh has asked for the wisdom of the Perl Monks concerning the following question:

Code I'm now responsible for (not written by me) isn't working after upgrading Perl. I've boiled the discrepancy down to this snippet:

use Safe; my $safe = new Safe; \&{"Safe::Root0::xxx"};

Under Perl 5.14.2, this generates an error; under 5.18.2, it does not. Safe 2.29 vs. 2.35 doesn't seem to matter, and dependencies seem identical. Does anyone know if something's changed in Perl itself to cause this?

Replies are listed 'Best First'.
Re: Safe issue
by wjw (Priest) on Apr 26, 2014 at 05:59 UTC
    This might explain it?
    Bug Report

    ...the majority is always wrong, and always the last to know about it...
    Insanity: Doing the same thing over and over again and expecting different results...
      Hm, that is interesting and possibly related, but it doesn't look like the same issue. The behavior I'm seeing wasn't affected on 5.14.2 when I upgraded Safe, and my snippet doesn't use any "*" syntax. I remain baffled.