[Catalyst] Catalyst best practices?

leonard.a.jaffe at jpmchase.com leonard.a.jaffe at jpmchase.com
Mon Jul 31 15:38:51 CEST 2006


Around 07/30/2006 11:13 PM, John Napiorkowski <jjn1056 at yahoo.com> wrote:

> [ Edit]
> Here's what I am doing:
> 
> 1)  I'd like to see the search path for stuff evolve as well.  I know 
the M/V/C 
> directories are just a starting point and that in the end maybe 
something else 
> will work better for us.  I think having multiple roots for searching 
for 
> components arranged something like the way perl separates CPAN libraries 
could 
> help sort things out a lot.
> 
> /lib
>     /vendor    #ready to go catalyst apps that a vendor provides for you
>     /site        #Catalyst stuff that you install from cpan
>     /local
>         /Controller
>        /Model
>         /View
> 
> [ Edit]


As you know, this is already possible.  That lib directory at the root of 
your tree is Catalyst's -I setting. This is why you have to access 
controllers 
as myapp::Controller::mycontroller and models as myapp::Model::mymodel. In 
your
tree above, myapp has been renamed "local".


So unless you're allergic to writing myapp::site::something::or::other and 

myapp::vendor::some::other::module you're already equipped.

I do like the idea of a config setting for lib dirs, but I wonder about 
the timing, 
of loading the various modules and plugins.  Specifically will 
configloader execute, 
and set the lib path correctly before cat tries to load any of you local 
plugins, 
or perl tries to locate and use() local modules.


I think that  prefer to maintain a single root lib  directory.


Len.


-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060731/fa2dbefd/attachment.htm 


More information about the Catalyst mailing list