- use subs::auto in => 'subs::auto::Test::Pkg';
-
- eval { subs::auto::Test::Pkg::foo 5 };
- is($@, '', 'compiled to subs::auto::Test::Pkg::foo(5)');
- is($foo, 10, 'subs::auto::Test::Pkg::foo was really called');
-
- {
- use subs::auto;
-
- eval { foo 3 };
- is($@, '', 'compiled to foo(3)');
- is($foo, 3, 'main::foo was really called');
+ eval q{
+ use subs::auto in => 'subs::auto::Test::Pkg';
+ subs::auto::Test::Pkg::foo 1
+ };
+ my $err = $@;
+ is($err, '', 'compiled to subs::auto::Test::Pkg::foo(1)');
+ is($foo, 3, 'subs::auto::Test::Pkg::foo was really called');
+}