2 use warnings FATAL => 'all';
3 use Test::More qw(no_plan);
11 our @EXPORT_OK = qw(thing);
15 package MultiExporter;
21 warnings->import::into($target);
22 MyExporter->import::into($target, 'thing');
23 CheckFile->import::into(1);
26 $INC{"MultiExporter.pm"} = 1;
35 @checkcaller = caller;
38 $INC{"CheckFile.pm"} = 1;
58 local $SIG{__WARN__} = sub { push @w, @_; };
60 }, 'thing', 'returned thing ok');
62 is(scalar @w, 1, 'Only one entry in @w');
64 like($w[0], qr/uninitialized/, 'Correct warning');
66 is $checkcaller[0], 'TestPackage', 'import by level has correct package';
67 is $checkcaller[1], __FILE__, 'import by level has correct file';
68 is $checkcaller[2], 1, 'import by level has correct line';