summaryrefslogtreecommitdiff
path: root/lib/Attribute/Handlers
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2002-06-08 19:42:33 +0000
committerArtur Bergman <sky@nanisky.com>2002-06-08 19:42:33 +0000
commit448fed509a7762f7e1ddb3ec250ba650f491e076 (patch)
tree23f5ce2232bd85dab9a4c966df23265604eec744 /lib/Attribute/Handlers
parent7701ffb58b8f3a2ff02db582ebe083d697326f5c (diff)
downloadperl-448fed509a7762f7e1ddb3ec250ba650f491e076.tar.gz
Prepare CPAN release of Attribute::Handlers
Make the test case know about the changes in attributes in 5.8 (lexical) and also turn off some warnings. p4raw-id: //depot/perl@17112
Diffstat (limited to 'lib/Attribute/Handlers')
-rw-r--r--lib/Attribute/Handlers/t/multi.t14
1 files changed, 11 insertions, 3 deletions
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 );
+}
+