summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-13 17:03:16 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-13 17:36:53 -0800
commit84ed39923aa892dfb4b1098447ae6f1366c3cfd2 (patch)
tree368f93f9af879c4c83f654abc6eaf945e0278e9d /lib
parentf2279a62334edecdf595cf73fa6cd33dbee3f2ff (diff)
downloadperl-84ed39923aa892dfb4b1098447ae6f1366c3cfd2.tar.gz
Test for deparsing proto sub calls with &
See the previous commit’s explanation.
Diffstat (limited to 'lib')
-rw-r--r--lib/B/Deparse.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index 5254db4db6..19d541af79 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -13,7 +13,7 @@ BEGIN {
use warnings;
use strict;
-my $tests = 40; # not counting those in the __DATA__ section
+my $tests = 41; # not counting those in the __DATA__ section
use B::Deparse;
my $deparse = B::Deparse->new();
@@ -331,6 +331,16 @@ is($a, <<'EOCODI', 'no extra output when deparsing foo()');
foo();
EOCODI
+# Sub calls compiled before importation
+like runperl(stderr => 1, switches => [ '-MO=-qq,Deparse', $path ],
+ prog => 'BEGIN {
+ require Test::More;
+ Test::More::->import;
+ is(*foo, *foo)
+ }'),
+ qr/&is\(/,
+ 'sub calls compiled before importation of prototype subs';
+
# CORE::no
$a = readpipe qq`$^X $path "-MO=Deparse" -Xe `
.qq`"use feature q|:all|; my sub no; CORE::no less" 2>&1`;