Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Perl 5.34 is released

by stevieb (Canon)
on May 21, 2021 at 16:35 UTC ( [id://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 (Archbishop) 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

      Simpler:

      use experimental qw( try );

      Seeking work! You can reach me at ikegami@adaelis.com

        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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-26 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found