Re: Import oddity

2004-02-17 Thread Steve Grazzini
Dan Muey wrote: Any thoughts? Erm, it looks okay. Maybe if you showed a complete example and the error or warnings (or misbehavior) somebody would see the problem. Here's what I was using. BEGIN { package Foo; use base qw(Exporter); use strict; our @EXPORT_OK =

RE: Import oddity [SOLVED!]

2004-02-17 Thread Dan Muey
> Dan Muey wrote: > > Any thoughts? > > Erm, it looks okay. Maybe if you showed a complete example > and the error or warnings (or misbehavior) somebody would see > the problem. > > Here's what I was using. > > BEGIN { > package Foo; > use base qw(Exporter); >

RE: Import oddity

2004-02-17 Thread Dan Muey
> > Dan Muey wrote: > > Any thoughts? > > Erm, it looks okay. Maybe if you showed a complete example > and the error or warnings (or misbehavior) somebody would see > the problem. > > Here's what I was using. > > BEGIN { > package Foo; > use base qw(Exporter); >

RE: Import oddity

2004-02-17 Thread Dan Muey
> Dan Muey wrote: > > I tried both and no go. All is well (IE the thigns specified > > are Exported to the script) if I do not have > strict->import; (Which makes > > the script act as if they had 'use strict;' in the script) > > Did you "use strict" or "require strict" anywhere? > package Foo

Re: Import oddity

2004-02-17 Thread Steve Grazzini
Dan Muey wrote: I tried both and no go. All is well (IE the thigns specified are Exported to the script) if I do not have strict->import; (Which makes the script act as if they had 'use strict;' in the script) Did you "use strict" or "require strict" anywhere? -- Steve -- To unsubscribe, e-mail:

RE: Import oddity

2004-02-17 Thread Dan Muey
> Dan Muey wrote: > >>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? > > The problem here

Re: Import oddity

2004-02-17 Thread Steve Grazzini
Dan Muey wrote: 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? The problem here is that Exporter::import() looks at th

RE: Import oddity

2004-02-17 Thread Dan Muey
> 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 m

Re: Import oddity

2004-02-17 Thread James Edward Gray II
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

Import oddity

2004-02-17 Thread Dan Muey
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(Ex