X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fautouse.pm;h=85db01fa90f96b60bc2cadcd0d378f5c9aceb29b;hb=7d161605f8e10199e4c300f0a0e3d3c71656ee35;hp=8057d18f657284d879534e10a9701b1039cbdcdb;hpb=08e0cdb53693ab205dfafc01b835c6f8381d1e83;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/autouse.pm b/lib/autouse.pm index 8057d18..85db01f 100644 --- a/lib/autouse.pm +++ b/lib/autouse.pm @@ -3,7 +3,7 @@ package autouse; #use strict; # debugging only use 5.003_90; # ->can, for my $var -$autouse::VERSION = '1.02'; +$autouse::VERSION = '1.04'; $autouse::DEBUG ||= 0; @@ -73,9 +73,10 @@ sub import { sub vet_import ($) { my $module = shift; if (my $import = $module->can('import')) { - croak "autoused module has unique import() method" + croak "autoused module $module has unique import() method" unless defined(&Exporter::import) - && $import == \&Exporter::import; + && ($import == \&Exporter::import || + $import == \&UNIVERSAL::import) } }