it seems that calling pragma->import() raises a warning in
perl5.005_03. It may be a lexer bug in 5.005_03 ...
% perl5.00503 -we 'require base; base->import("CGI")'
Unquoted string "base" may clash with future reserved word at -e line 1.
P.S. Mike, the same thing applies with your mixin.pm
--
Tatsuhiko Miyagawa <[EMAIL PROTECTED]>
diff -ruN Test-Simple-0.43/lib/Test/More.pm Test-Simple-0.43.new/lib/Test/More.pm
--- Test-Simple-0.43/lib/Test/More.pm Thu Apr 11 12:27:47 2002
+++ Test-Simple-0.43.new/lib/Test/More.pm Tue Apr 23 03:17:56 2002
@@ -670,7 +670,7 @@
eval <<USE;
package $pack;
require $module;
-$module->import(\@imports);
+import $module (\@imports);
USE
my $ok = $Test->ok( !$@, "use $module;" );
diff -ruN Test-Simple-0.43/t/use_ok.t Test-Simple-0.43.new/t/use_ok.t
--- Test-Simple-0.43/t/use_ok.t Fri Jan 11 09:42:24 2002
+++ Test-Simple-0.43.new/t/use_ok.t Tue Apr 23 03:18:54 2002
@@ -5,7 +5,7 @@
}
}
-use Test::More tests => 7;
+use Test::More tests => 10;
# Using Symbol because it's core and exports lots of stuff.
{
@@ -25,4 +25,12 @@
package Foo::three;
::use_ok("Symbol", qw(gensym ungensym));
::ok( defined &gensym && defined &ungensym, ' multiple args' );
+}
+
+{
+ package Foo::four;
+ my $warn; local $SIG{__WARN__} = sub { $warn .= shift; };
+ ::use_ok("constant", qw(foo bar));
+ ::ok( defined &foo, 'constant' );
+ ::is( $warn, undef, 'no warning');
}