Hi Mark,

let me try to tackle your questions incrementally.

On Thu, 02 Aug 2012 09:17:00 -0400
Mark Haney <ma...@abemblem.com> wrote:

> I've got an odd situation here and I'm not sure what to think about it. 
>   I've had to pull several subroutines into it's own package since they 
> all have similar functions (as far as that goes) and I find that I reuse 
> them more than I thought.

Did you put them into their own package or also into their own module? I hope
you know there's a difference. Do the module and package share the same name.

> 
> My question stems from the EXPORTER directive.  I've got one package 
> that does NOT include an EXPORTER nor exports any subroutines, yet it's 
> used by virtually all other parts of the system.  I've never really 
> noticed it before, which is why now it's so curious.

By "EXPORTER" you probably mean «use parent 'Exporter';» (or use base
'Exporter') along with the special variable of @EXPORT, @EXPORT_OK, etc. In any
case, is it a module that does not have a "package" specifier (in which case
it will dump its contents into the current package). Maybe it does have a
"package" specifier, but names from it are called using MyPackage::my_sub()
(i.e: fully-qualified names).

> 
> I can't find anywhere that EXPORTER is optional, but also can't find 
> anything special about the content or syntax, etc about the package that 
> doesn't use it.

Use of Exporter.pm (or Sub::Exporter for that matter) is optional, and you may
opt to avoid them if you're creating an object-oriented interface.

> 
> So, should I use it?  Does it really matter in small apps?  What am I 
> missing here?

Can you give a code sample that reproduces the issue?

Regards,

        Shlomi Fish

> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Why I Love Perl - http://shlom.in/joy-of-perl

Chuck Norris can make the statement “This statement is false.” a true one.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to