6 use Test::More tests => 16;
12 use subs::auto in => 'subs::auto::Test::Pkg';
13 subs::auto::Test::Pkg::foo 1
16 is($err, '', 'compiled to subs::auto::Test::Pkg::foo(1)');
17 is($foo, 3, 'subs::auto::Test::Pkg::foo was really called');
22 use subs::auto in => 'subs::auto::Test::Pkg';
29 no warnings 'uninitialized';
30 is($err, '', 'compiled to foo(2)');
31 is($foo, 4, 'main::foo was really called');
36 use subs::auto in => 'subs::auto::Test::Pkg';
39 subs::auto::Test::Pkg::foo 3;
43 no warnings 'uninitialized';
44 is($err, '', 'compiled to subs::auto::Test::Pkg::foo(3)');
45 is($foo, 9, 'subs::auto::Test::Pkg::foo was really called');
50 use subs::auto in => 'subs::auto::Test::Pkg';
54 package subs::auto::Test::Pkg;
60 no warnings 'uninitialized';
61 Test::More::is($err, '', 'compiled to foo(4)');
62 Test::More::is($foo, 12, 'subs::auto::Test::Pkg::foo was really called');
67 use subs::auto in => 'subs::auto::Test::Pkg';
71 package subs::auto::Test::Pkg;
77 no warnings 'uninitialized';
78 Test::More::is($err, '', 'compiled to main::foo(5)');
79 Test::More::is($foo, 10, 'main::foo was really called');
83 package subs::auto::Test::Pkg;
90 no warnings 'uninitialized';
91 Test::More::is($err, '', 'compiled to foo(6)');
92 Test::More::is($foo, 18, 'subs::auto::Test::Pkg::foo was really called');
97 use subs::auto in => '::';
101 no warnings 'uninitialized';
102 is($err, '', 'compiled to foo(7)');
103 is($foo, 14, 'main::foo was really called');
107 package subs::auto::Test;
110 use subs::auto in => '::Pkg';
112 package subs::auto::Test::Pkg;
117 no warnings 'uninitialized';
118 Test::More::is($err, '', 'compiled to foo(8)');
119 Test::More::is($foo, 24, 'subs::auto::Test::Pkg::foo was really called');
123 $main::foo = 2 * $_[0];
126 sub subs::auto::Test::Pkg::foo {
127 $main::foo = 3 * $_[0];