From: Jesse Sheidlower Date: Thu, 7 Jul 2005 15:18:50 +0000 (+0000) Subject: Cookbook: outside classes; tweaks X-Git-Tag: 5.7099_04~1264 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=3912ee045d75635a4ce6bccac812ab5a59d07368 Cookbook: outside classes; tweaks --- diff --git a/lib/Catalyst/Manual/Cookbook.pod b/lib/Catalyst/Manual/Cookbook.pod index 07e9794..cf66c1c 100644 --- a/lib/Catalyst/Manual/Cookbook.pod +++ b/lib/Catalyst/Manual/Cookbook.pod @@ -588,6 +588,20 @@ This is equivalent to: See also L. +=head2 Using existing CDBI (etc.) classes with Catalyst + +Many people have existing Model classes that they would like to use with +Catalyst (or, conversely, they want to write Catalyst models that can be +used outside of Catalyst, e.g. in a cron job). It's trivial to write a +simple component in Catalyst that slurps in an outside Model: + + package MyApp::M::Catalog; + use base qw/Catalyst::Base Some::Other::CDBI::Module::Catalog/; + 1; + +and that's it! Now C is part of your +Cat app as C. + =head1 AUTHOR Sebastian Riedel, C @@ -596,8 +610,7 @@ Viljo Marrandi, C Marcus Ramberg, C Jesse Sheidlower, C Andy Grundman, C -Marcus Ramberg C -Chisel Wright C +Chisel Wright, C =head1 COPYRIGHT