http://www.perlmonks.org?node_id=961442


in reply to Re^21: can't import using exporter
in thread can't import using exporter

I wondered why I got an extra warning in the cut down version...

but that's what I get for cuttin down.... can't type straight. ;-)

ok so export var and not it's contents...

I get warning, but it appears to work.

Ok... but that's what I have in the larger program. But that's not the error it puts out...

> less testme.pl #!/usr/bin/perl -w use strict; package _Debug;{ our $Filename2Fields = 1; our $HaltOnError = 2; our $DEBUG_OPS = 3; our @EXPORT=qw( Debug $DEBUG_OPS $Filename2Fields $Halt_on_Error); use parent 'Exporter'; sub Debug($$) { my ($what, $str)=@_; if ($what & $DEBUG_OPS) { print STDERR $str; } } } package Transcode_plug;{ import _Debug; sub get_fieldAR_from_filename($) { my $file=$_[0]; Debug($Filename2Fields,"get_fieldAR_from_filename($file)\n"); } } Transcode_plug::get_fieldAR_from_filename('dummy'); # vim: ts=2 sw=2 Ishtar:/Audio/scripts> testme.pl Global symbol "$Filename2Fields" requires explicit package name at ./t +estme.pl line 16. Execution of ./testme.pl aborted due to compilation errors.

But if I turn off strict and turn off warnings, it runs just fine.

*cough*.

How is this not a bug in perl 5.14? Crying wolf is bad, we learned that in grade school.