hotshoe has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
Any thoughts regarding this error:
Type of arg 1 to Try::Tiny::catch must be block or sub {} (not referen +ce constructor)
I'm not sure what to make of it. I don't get the error on my macOS system (v5.18.2) but I first saw it tonight when I switched to running same code on Windows (v5.28.1 Strawberry Distro) and w/ ActiveState distro as well.
I'm getting the error consistently through my code, including in modules and script -- wherever try {} catch {}; is used, even if I gut the subroutine of all code except for an empty try / catch block. But oddly, no issue when I try the same in a standalone do nothing script.
Any advice appreciated!
Thanks,
-Roland.
2019-01-06 Athanasius added paragraph and code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Try::Tiny complaining catch must be block or sub {} (not reference constructor)
by haukex (Archbishop) on Jan 06, 2019 at 09:27 UTC | |
by hotshoe (Novice) on Jan 07, 2019 at 00:03 UTC | |
by haukex (Archbishop) on Jan 07, 2019 at 14:36 UTC | |
by hotshoe (Novice) on Jan 07, 2019 at 21:26 UTC | |
|
Re: Try::Tiny complaining catch must be block or sub {} (not reference constructor)
by AnomalousMonk (Archbishop) on Jan 06, 2019 at 07:27 UTC | |
|
Re: Try::Tiny complaining catch must be block or sub {} (not reference constructor) (updated)
by haukex (Archbishop) on Jan 06, 2019 at 08:49 UTC |