Mailing List Archive

More testing / dogfooding of `try` feature
Hi all,

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

https://github.com/Perl/perl5/issues/18855

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
to

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
using).

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

leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Re: More testing / dogfooding of `try` feature [ In reply to ]
2021-6-16 8:20 Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> wrote:


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

Yes.

I only know about the Dev community and Reddit in English, but why not post
it where Perl users will see it?

For example, each country's blog service, etc. I also tweeted about the
real test of try catch in Japanese my twitter.
Re: More testing / dogfooding of `try` feature [ In reply to ]
On Wed, 16 Jun 2021 08:49:34 +0900
Yuki Kimoto <kimoto.yuki@gmail.com> wrote:

> I only know about the Dev community and Reddit in English, but why
> not post it where Perl users will see it?

Done

https://www.reddit.com/r/perl/comments/o0s5y0/we_need_more_testing_of_perl_534s_try_feature/

--
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/