]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - t/30-scope.t
In t/30-scope.t, avoid failures for "eval 'no indirect; $x = new Foo'" for being...
[perl/modules/indirect.git] / t / 30-scope.t
index 19e29df2e520c30e3df66c29d5c1df2ca74f4238..f3586890c876e2583128df3b1f2682695d22cd48 100644 (file)
@@ -4,11 +4,11 @@ use strict;
 use warnings;
 
 my $tests;
-BEGIN { $tests = 8 }
+BEGIN { $tests = 10 }
 
 use Test::More tests => 1 + $tests + 1 + 2;
 
-my %wrong = map { $_ => 1 } 2, 3, 5, 7;
+my %wrong = map { $_ => 1 } 2, 3, 5, 7, 9, 10;
 
 sub expect {
  my ($pkg) = @_;
@@ -43,7 +43,7 @@ sub expect {
 }
 
 {
- my $w;
+ my $w = '';
  local $SIG{__WARN__} = sub {
   $w = 'more than 2 warnings' if $w;
   $w = join '', 'warn:', @_
@@ -91,3 +91,10 @@ my $g = new P7;
 use indirect;
 
 my $h = new P8;
+
+{
+ no indirect;
+ eval { my $i = new P9 };
+}
+
+eval { no indirect; my $j = new P10 };