[Catalyst] Where to put "use"
Jose Luis Martinez
jlmartinez-lists-catalyst at capside.com
Wed Feb 18 14:28:59 GMT 2009
Dermot escribió:
> Hi,
>
> This might be a daft question but I'll chance it.
>
> One of my controller is starting to use a lot of other modules like
> File::Find...etc but they are usually confined to one subroutine or
> method. It's most common to see all the use statements at the top of
> the package but I have seen instances where they are declared within
> the Sub block. Is there an advantage is declaring the use of modules,
> that are only used by a single subroutine, in that subroutine?
>
I tend to use Module::Load to load seldom used modules at runtime to
reduce loading time and memory footprint.
Cheers,
Jose Luis Martinez
jlmartinez at capside.com
More information about the Catalyst
mailing list