- eval { foo 7 };
- Test::More::is($@, '', 'compiled to foo(7)');
- Test::More::is($foo, 14, 'subs::auto::Test::Pkg::foo was really called');
+{
+ eval q{
+ use subs::auto in => 'subs::auto::Test::Pkg';
+ {
+ use subs::auto;
+ {
+ package subs::auto::Test::Pkg;
+ foo 4
+ }
+ }
+ };
+ my $err = $@;
+ no warnings 'uninitialized';
+ Test::More::is($err, '', 'compiled to foo(4)');
+ Test::More::is($foo, 12, 'subs::auto::Test::Pkg::foo was really called');
+}