summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Attribute/Handlers.pm2
-rw-r--r--lib/Attribute/Handlers/t/multi.t14
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm
index 3afccd56e9..ef67a3d4da 100644
--- a/lib/Attribute/Handlers.pm
+++ b/lib/Attribute/Handlers.pm
@@ -2,7 +2,7 @@ package Attribute::Handlers;
use 5.006;
use Carp;
use warnings;
-$VERSION = '0.76';
+$VERSION = '0.77';
# $DB::single=1;
my %symcache;
diff --git a/lib/Attribute/Handlers/t/multi.t b/lib/Attribute/Handlers/t/multi.t
index 7bcb284a23..4cb49928d8 100644
--- a/lib/Attribute/Handlers/t/multi.t
+++ b/lib/Attribute/Handlers/t/multi.t
@@ -149,19 +149,22 @@ ok( $out eq "begin\nbye\nbye\n", 46 );
sub dummy { my $dummy : Dummy; }
$applied = 0;
dummy(); dummy();
+if($] < 5.008) {
+ok(1, "47 # skip does not work with perl prior to 5.8");
+} else {
ok( $applied == 2, 47 );
-
+}
# 45-47 again, but for our variables
$out = "begin\n";
{ our $dummy; $dummy = bless {}, 'Dummy'; }
ok( $out eq "begin\n", 48 );
-{ our $dummy : Dummy; $dummy = bless {}, 'Dummy'; }
+{ no warnings; our $dummy : Dummy; $dummy = bless {}, 'Dummy'; }
ok( $out eq "begin\nbye\n", 49 );
undef $::dummy;
ok( $out eq "begin\nbye\nbye\n", 50 );
# are lexical attributes reapplied correctly?
-sub dummy_our { our $banjo : Dummy; }
+sub dummy_our { no warnings; our $banjo : Dummy; }
$applied = 0;
dummy_our(); dummy_our();
ok( $applied == 0, 51 );
@@ -172,4 +175,9 @@ eval {
my $groucho : Stooge;
};
my $match = $@ =~ /^Won't be able to apply END handler/;
+if($] < 5.008) {
+ok(1,"52 # Skip, no difference between lexical handlers and normal handlers prior to 5.8");
+} else {
ok( $match, 52 );
+}
+