6 use Test::More tests => 12;
11 use subs::auto in => 'subs::auto::Test::Pkg';
13 eval { subs::auto::Test::Pkg::foo 5 };
14 is($@, '', 'compiled to subs::auto::Test::Pkg::foo(5)');
15 is($foo, 10, 'subs::auto::Test::Pkg::foo was really called');
21 is($@, '', 'compiled to foo(3)');
22 is($foo, 3, 'main::foo was really called');
25 package subs::auto::Test::Pkg;
28 Test::More::is($@, '', 'compiled to foo(7)');
29 Test::More::is($foo, 14, 'subs::auto::Test::Pkg::foo was really called');
32 Test::More::is($@, '', 'compiled to main::foo(9)');
33 Test::More::is($foo, 9, 'main::foo was really called');
39 use subs::auto in => '::';
42 is($@, '', 'compiled to foo(11)');
43 is($foo, 11, 'main::foo was really called');
47 package subs::auto::Test;
49 use subs::auto in => '::Pkg';
52 package subs::auto::Test::Pkg;
55 Test::More::is($@, '', 'compiled to foo(13)');
56 Test::More::is($foo, 26, 'subs::auto::Test::Pkg::foo was really called');
64 sub subs::auto::Test::Pkg::foo {
65 $main::foo = 2 * $_[0];