Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^8: Perl try { } catch(e) { }

by jdeguest (Sexton)
on Jun 18, 2021 at 11:53 UTC ( #11133999=note: print w/replies, xml ) Need Help??

in reply to Re^7: Perl try { } catch(e) { }
in thread Perl try { } catch(e) { }

Yes, sorry, I wasn't doubting the quality of the implementation of Nice::Try.

I did work hard to develop it thinking it would benefit many, but there is always room for improvement, and I enjoy constructive criticism and perl monks is always a great place to get excellent feedbacks, so thank you.

Though PPI is certainly excellent, like all static Perl parsers it can't actually parse all of Perl. Sadly, all source filters suffer from the fact that they can be broken by things outside of their control, namely, the source code that they are inserted into.

Yes, it's true that although PPI is really good, it has its limitations. There will definitely be edge cases when PPI will fail, unfortunately. Right now, as of perl v5.34, there is an experimental implementation of try-catch and hopefully in the future, they will fully implement it. However, because it is a feature, the use experimental 'try'; must be added in each block where one wants to use try-catch.

In the snippet you provided, Nice::Try would render the same result by the way.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-11-27 05:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found