Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Perl 5.34 is released

by stevieb (Canon)
on May 21, 2021 at 16:35 UTC ( #11132855=note: print w/replies, xml ) Need Help??

in reply to Perl 5.34 is released

I'll be damned... try/catch! Yay!

Replies are listed 'Best First'.
Re^2: Perl 5.34 is released
by kcott (Bishop) on May 22, 2021 at 09:20 UTC

    G'day stevieb,

    You may already know what follows. This information is for those who don't.

    The try/catch feature is experimental.

    Any usage should be preceded by these lines (in the order shown):

    no warnings 'experimental::try'; use feature 'try';

    Avoid all experimental features, including this one, in any production-grade code.

    See "perlsyn: Try Catch Exception Handling" for more details.

    — Ken


      use experimental qw( try );

      Seeking work! You can reach me at

        I may not have been aware of the experimental pragma — not overly surprising as I avoid experimental features — so thanks for the information.

        The experimental documentation (for v5.34) lists supported features: try is not among them. However, it does appear to work: no "Can't enable unknown feature try ..." error, and try/catch functions as expected. It looks like the documentation needs an update.

        — Ken

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132855]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-05-21 10:24 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.