my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/;
-my $total_tests = 50;
+my $total_tests = 49;
if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; }
print "1..$total_tests\n";
}
}
-# [perl #49472] Attributes + Unkown Error
-
-{
- do_require
- 'use strict;sub MODIFY_CODE_ATTRIBUTE{} sub f:Blah {$nosuchvar}';
- my $err = $@;
- $err .= "\n" unless $err =~ /\n$/;
- unless ($err =~ /Global symbol "\$nosuchvar" requires /) {
- $err =~ s/^/# /mg;
- print "${err}not ";
- }
- print "ok ", ++$i, " [perl #49472]\n";
-}
-
##########################################
# What follows are UTF-8 specific tests. #
# Add generic tests before this point. #
use warnings;
-plan 90;
+plan 91;
$SIG{__WARN__} = sub { die @_ };
ok !defined(attributes::get(\PVBM)),
'PVBMs don\'t segfault attributes::get';
+{
+ # [perl #49472] Attributes + Unkown Error
+ eval '
+ use strict;
+ sub MODIFY_CODE_ATTRIBUTE{}
+ sub f:Blah {$nosuchvar};
+ ';
+
+ my $err = $@;
+ like ($err, qr/Global symbol "\$nosuchvar" requires /, 'perl #49472');
+}
+
# Test that code attributes always get applied to the same CV that
# we're left with at the end (bug#66970).
{