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 =
> 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);
>
> > 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);
>
> 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
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:
> 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
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
> 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
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
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
10 matches
Mail list logo