Hi Marc,

On Wed, 20 Jul 2011 15:38:06 -0700
Marc <sono...@fannullone.us> wrote:

>       I'd like to organize a project's files into subdirectories for better
> housekeeping.  I thought that use lib "."; would also include any
> subdirectories, but sadly it doesn't.  Is there a way to include all subdirs
> without having a list a mile long like this? 
> use lib "/Applications/MAMP/cgi-bin/cart/sql/lib/Module/"; 
> use lib "/Applications/MAMP/cgi-bin/cart/sql/lib/Params/"; 
> use lib "/Applications/MAMP/cgi-bin/cart/sql/Business/CreditFraud/"; etc...
> 
>       Or am I going about it the wrong way?
> 

I think you are.

You can load modules from lib using "use Module::SubModule;" or "use
Params::Validate" - no need to load all subdirectories. Just use "::" for
loading stuff in sub-directories. For more information see:

http://perl-begin.org/topics/modules-and-packages/

Regards,

        Shlomi Fish

> Thanks,
> Marc



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

<mst> I find it’s usually safe to assume that whatever shlomif’s doing, there
isn’t a good reason for it.

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