in reply to Re^5: Try::Tiny and -E
in thread Try::Tiny and -E
Any reason you didn't provide your tests? Because my testing confirms what I said.
$ perl -e' use feature qw( try ); use Try::Tiny; try { }; CORE::say "ok"; ' syntax error at -e line 4, near "};" Execution of -e aborted due to compilation errors.
vs
$ perl -e' use Try::Tiny; use feature qw( try ); try { }; CORE::say "ok"; ' syntax error at -e line 4, near "};" Execution of -e aborted due to compilation errors.
And
$ perl -e' use feature qw( try ); use Try::Tiny; { no feature qw( try ); try { }; } CORE::say "ok"; ' ok
vs
$ perl -e' use Try::Tiny; use feature qw( try ); { no feature qw( try ); try { }; } CORE::say "ok"; ' ok
So I repeat: The order in which they are loaded is irrelevant, and what matters is if the feature is enabled or not when the try is encountered.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Try::Tiny and -E
by LanX (Saint) on Dec 29, 2025 at 11:56 UTC | |
by ikegami (Patriarch) on Dec 30, 2025 at 00:02 UTC | |
by LanX (Saint) on Dec 30, 2025 at 03:10 UTC | |
by ikegami (Patriarch) on Dec 30, 2025 at 05:06 UTC |