in reply to Nested Evals in Old Perl 5.10

Have you considered Try::Tiny? It has zero dependencies, no CPAN test failures back to perl v5.8.8, and comes highly recommended in both the Effective Perl Programming and Modern Perl books, as noted at Re: eval to replace die? (Exceptions and Error Handling References).

Try::Tiny is also compatible with the new core Perl try-catch feature, as described in more detail at Re: 5.40 released (perl new feature References).

👁️🍾👍🦟

Replies are listed 'Best First'.
Re^2: Nested Evals in Old Perl 5.10
by mikkoi (Beadle) on Aug 25, 2024 at 09:06 UTC

    I want to stick to using only Perl distro modules, so Try::Tiny is not "allowed". Otherwise, Try::Tiny is excellent and I use it in many other projects.