in reply to Re: Perl 28 broke L: How to fix?
in thread Perl 28 broke L: How to fix?

Note that using -M actually doesn't necessarily make the one-liners longer

Not for this example but the real win is not having to worry about -M at all once you have -ML.

breakage of the module was reported in #131571

Thanks for the history lesson. So Perl's appearance of backward compatability was an illusion due to not fatalizing deprecated bugs for 20 years? Bugs were mistaken for features: "So, this is something we're likely to see many times in this annual development cycle​: code that breaks because we're fatalizing a behavior we've tolerated for twenty years (+ 1 month)."

I see a lot of messages from recent versions of Perl about code that is "no longer allowed" and "forbidden" and even "illegal"! The code police have made easy things impossible. If you guys can't figure this out my chances are slim:

haukex: At the moment, I don't have any good ideas for a replacement.
Corion: I'm not sure how to best implement the functionality of L.

Replies are listed 'Best First'.
Re^3: Perl 28 broke L: How to fix?
by haukex (Archbishop) on Oct 28, 2019 at 21:55 UTC
    I see a lot of messages from recent versions of Perl about code that is "no longer allowed" and "forbidden" and even "illegal"! The code police have made easy things impossible.

    I dunno about that, deprecations are usually made with a good amount of consideration, watching all of CPAN for breakage (as in this case) as a canary for how Perl is used by devs in production, and there is usually a workaround or fix possible for code that is affected by this. Personally, I don't remember really being affected by any surprising deprecations. So I'd be curious what problems specifically you've run into.

    As I said, in this case, I doubt that this module was ever supposed to work with plain function calls, and only methods. If you look at the really early and unreleased version of the module, that's all it supported. And the tests specifically test for the failure of a function call.

    If you guys can't figure this out my chances are slim

    There are probably some hacks that would make it possible, but I think chances are that they'd be pretty ugly hacks. Note that using UNIVERSAL::AUTOLOAD is not so great to begin with - anything that installs things into UNIVERSAL risks having other modules break in mysterious ways.