> On Feb 17, 2004, at 7:56 AM, Dan Muey wrote:
> 
> > 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:
> 
> I think "add" is the wrong word here.  You "replaced" the inherited 
> import() method.
> 
> > package Foo::Monkey;;
> > [ standard goodies cut]
> > use base qw(Exporter);
> >
> > sub import { strict->import; }
> 
> sub import {
>       my $class = shift;
>       $class->SUPER::import(@_);
>       strict->import;
> }
> 
> I believe that will fix it.  Not 100% sure though.  Never 
> tried it.  ;)
> 

I just tried it and no go. Any other thoughts anyone?

Simply put sub import { strict->import; } breaks Exporter's @EXPORT_OK functionality.


> Hope that helps.
> 

It does help, we're getting there! Thanks :)

> James
> 
> 

--
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