> On Feb 4, Dan Muey said:
> 
> ># for old time's sake we'll just use our favorite module
> >use Foo::Monkey qw(:Foo :Bar -doamazingthings);
> 
> Well, depending on what you want to do with the arguments, 
> you might want to use the Exporter module to handle exporting 
> functions, variables, etc.
> 
>   perldoc perlmod (look for "Perl Modules")
>   perldoc Exporter

I do use Exporter actually should've mentioned that sorry, I'll check out your 
perldocs to.
Thanks

> 
> When you say
> 
>   use Module qw( args go here );
> 
> this is translated into
> 
>   BEGIN {
>     require Module;
>     Module->import(qw( args go here ));
>   }
> 
> Thus, you need an 'import' method in Module::.
> 
>   package Module;
> 
>   sub import {
>     my $class = shift;
>     print "You gave me (@_)\n";
>   }
> 

Perfect! Exactly what I needed.

> It's up to you to do something with @_.
> 

Thanks Jeff

> -- 
> Jeff "japhy" Pinyan

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