Hello,

Weird thing here:

I get a variable from a module via @EXPORT_OK
like so:

use Foo::Monkey '$howdy'; # import the variable $howdy
print $howdy;

Works perfect.

Now if I add strict->import; to my module's import function like so:

package Foo::Monkey;;
[ standard goodies cut]
use base qw(Exporter);

sub import { strict->import; }

our $howdy = 'Howdy';

our @EXPORT_OK = qw($howdy);

[rest of goodies cut]

Then the script gives me "Global symbol "$howdy" requires explicit 
package name..." since I'm not using 'my' (because the module should be 
Exporting it)


I really really want to keep strict->import but need to be able to use 
@EXPORT_OK and friends like normal.

Any ideas why /what is happening and what I can do to have my cake and 
eat it to? (IE Have my strict and Export it too)

TIA

Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to