From: Vincent Pit Date: Fri, 17 Apr 2009 13:31:12 +0000 (+0200) Subject: Test use/no indirect while parsing an indirect construct X-Git-Tag: v0.12~13 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=88fea8eaa6fc01af02741dcf05de7fd24fe8fc1d Test use/no indirect while parsing an indirect construct --- diff --git a/t/30-scope.t b/t/30-scope.t index 2546dee..1e1dcf3 100644 --- a/t/30-scope.t +++ b/t/30-scope.t @@ -4,11 +4,11 @@ use strict; use warnings; my $tests; -BEGIN { $tests = 10 } +BEGIN { $tests = 18 } use Test::More tests => 1 + $tests + 1 + 2; -my %wrong = map { $_ => 1 } 2, 3, 5, 7, 9, 10; +my %wrong = map { $_ => 1 } 2, 3, 5, 7, 9, 10, 14, 15, 17, 18; sub expect { my ($pkg) = @_; @@ -99,3 +99,23 @@ my $h = new P8; } eval { no indirect; my $j = new P10 }; + +{ + use indirect; + new P11 do { use indirect; new P12 }; +} + +{ + use indirect; + new P13 do { no indirect; new P14 }; +} + +{ + no indirect; + new P15 do { use indirect; new P16 }; +} + +{ + no indirect; + new P17 do { no indirect; new P18 }; +}