package # hide from PAUSE
Try::Tiny::ScopeGuard;
- use constant UNSTABLE_DOLLARAT => ($] < '5.013002') ? 1 : 0;
+ use constant UNSTABLE_DOLLARAT => ("$]" < '5.013002') ? 1 : 0;
sub _new {
shift;
die "foo";
} catch {
pass("catch invoked");
- local $TODO = "i don't think we can ever make this work sanely, maybe with SIG{__DIE__}" if $] < 5.014;
+ local $TODO = "i don't think we can ever make this work sanely, maybe with SIG{__DIE__}" if "$]" < 5.014;
like($_, qr/foo/);
};
finally {
SKIP: {
skip "DESTROY() not called in void context on perl $]", 1
- if $] < '5.008';
+ if "$]" < '5.008';
is (wantarray, undef, "Proper VOID context in finally{} 1");
}
return 'finally';
finally {
SKIP: {
skip "DESTROY() not called in void context on perl $]", 1
- if $] < '5.008';
+ if "$]" < '5.008';
is (wantarray, undef, "Proper VOID context in finally{} 2");
}
return 'finally';
use Try::Tiny;
use 5.010;
-no if $] >= 5.017011, warnings => 'experimental::smartmatch';
+no if "$]" >= 5.017011, warnings => 'experimental::smartmatch';
my ( $error, $topic );
{
local $TODO = "perhaps a workaround can be found"
- if $] < 5.017003;
+ if "$]" < 5.017003;
is( $topic, $error, 'error is also in $_' );
}
use Try::Tiny;
use 5.010;
-no if $] >= 5.017011, warnings => 'experimental::smartmatch';
+no if "$]" >= 5.017011, warnings => 'experimental::smartmatch';
my ( $foo, $bar, $other );