On Jul 16, 2007, at 8:48 AM, Daniel McBrearty wrote:

is there a way to have some C's and M's load into catalyst
conditionally? for example, if some config variable is set?

You can call load_classes() and pass something other than the default values. At one point for some reason I wanted to load only the modules at the top of my Schema directory, and not include anything in subfolders, so I did this:

throws ::Error::Unexpected;

# Only get the first level items, I don't want sub folders.
use Module::Find;
__PACKAGE__->load_classes(map { substr $_, length(__PACKAGE__ . '::') } findsubmod(__PACKAGE__));



_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to