summaryrefslogtreecommitdiff
path: root/lib/B/Deparse.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-21 23:16:16 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-22 16:08:33 -0800
commit62ae7cfb674910be2bce6fa43e3e506f941d7d58 (patch)
treefd33d682628eb4b577760cdb1939260f48d1862a /lib/B/Deparse.t
parent720a02e281a2a171c25d674b798fbfe46d2bbdaf (diff)
downloadperl-62ae7cfb674910be2bce6fa43e3e506f941d7d58.tar.gz
Deparse: Avoid uninit warning from undef &sub
Diffstat (limited to 'lib/B/Deparse.t')
-rw-r--r--lib/B/Deparse.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index 4fdb99b4e5..6e43b35be1 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -13,7 +13,7 @@ BEGIN {
use warnings;
use strict;
-my $tests = 43; # not counting those in the __DATA__ section
+my $tests = 44; # not counting those in the __DATA__ section
use B::Deparse;
my $deparse = B::Deparse->new();
@@ -506,6 +506,11 @@ is runperl(stderr => 1, switches => [ '-MO=-qq,Deparse', $path, '-T' ],
'$x =~ ($_ =~ /$a/);'."\n",
'$foo =~ <branch-folded match> under taint mode';
+unlike runperl(stderr => 1, switches => [ '-MO=-qq,Deparse', $path, '-w' ],
+ prog => 'BEGIN { undef &foo }'),
+ qr'Use of uninitialized value',
+ 'no warnings for undefined sub';
+
done_testing($tests);
__DATA__