develooper Front page | perl.perl5.porters | Postings from June 2021

More testing / dogfooding of `try` feature

Thread Next
Paul "LeoNerd" Evans
June 15, 2021 23:20
More testing / dogfooding of `try` feature
Message ID:
Hi all,

I've recently been looking at a bug with the new try/catch syntax in

It has me thinking that this sort of bug ought really to have been
caught well before 5.34.0, earlier in the 5.33.x development series. I
think a reason it wasn't is because not many people are actually making
use of this. Perhaps understandable given it was "only" a development
release, but now it's out in the wild in a real production version
perhaps there will be more eyeballs on it.

What we need here is more folks to actually use this new feature in
real code to check whether it actually works for real.

So how can you help?

 1) If you're already using `Syntax::Keyword::Try`, simply change that

       use Feature::Compat::Try;

    This will pull in S-K-T on older perls, or simply enable the
    core 'try' feature on 5.34 onwards.

 2) If you're using some other try-providing syntax module and you
    don't need to support older than 5.34, you can

       use feature 'try';

    and adjust your uses of the syntax accordingly (exactly what
    changes to make will depend on what other module you're already

    If you do need pre-5.34 compatibility as well, then I suggest using
    Feature::Compat::Try, as per above.

 3) If you don't have any form of module for providing a `try`-like
    syntax and are instead using plain ol' `eva{}`, well then now may
    be a perfect opportunity to give this a test. Either of the above
    techniques would do that - depending whether you need to support
    older than 5.34 or not.

Paul "LeoNerd" Evans      |  |

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About