summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-07-16 22:13:54 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-07-16 22:13:54 -0700
commitc70e3f2a00e9d0b62aa5717aebb9573d8cd6d5a0 (patch)
tree2385516ee56ac18384f139a02df83b23d542e1d9
parentabc55529237a5ba1f78b1a7b1fdd6e82167f8897 (diff)
downloadperl-c70e3f2a00e9d0b62aa5717aebb9573d8cd6d5a0.tar.gz
Skip tests sub_lval.t when attributes.pm cannot load
(e.g., under miniperl)
-rw-r--r--t/op/sub_lval.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/op/sub_lval.t b/t/op/sub_lval.t
index aaf8e56e6b..491b9e52b4 100644
--- a/t/op/sub_lval.t
+++ b/t/op/sub_lval.t
@@ -766,6 +766,7 @@ is $wheel, 8, 'tied pad var explicitly returned in list ref context';
is ($result, 'bar', "RT #41550");
}
+SKIP: { skip 'no attributes.pm', 1 unless eval 'require attributes';
fresh_perl_is(<<'----', <<'====', "lvalue can not be set after definition. [perl #68758]");
use warnings;
our $x;
@@ -780,6 +781,7 @@ lvalue attribute ignored after the subroutine has been defined at - line 6.
Can't modify non-lvalue subroutine call in scalar assignment at - line 7, near "3;"
Execution of - aborted due to compilation errors.
====
+}
{
my $x;
@@ -789,6 +791,7 @@ Execution of - aborted due to compilation errors.
is($x, 5, "subroutine declared with lvalue before definition retains lvalue. [perl #68758]");
}
+SKIP: { skip "no attributes.pm", 2 unless eval { require attributes };
sub utf8::valid :lvalue;
require attributes;
is "@{[ &attributes::get(\&utf8::valid) ]}", 'lvalue',
@@ -798,6 +801,7 @@ BEGIN { *wonky = \&marjibberous }
sub wonky :lvalue;
is "@{[ &attributes::get(\&wonky) ]}", 'lvalue',
'sub declaration with :lvalue applies it to assigned stub';
+}
sub fleen : lvalue { $pnare }
$pnare = __PACKAGE__;