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.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.