[Dbix-class] Retrieving list of loaded modules in MyApp::Model::Schema

Jason Kohles email at jasonkohles.com
Fri Mar 23 15:12:23 GMT 2007


On Mar 22, 2007, at 7:12 PM, RA Jones wrote:

> Following on from another thread about how to handle the debugobj,  
> I've run into another conundrum. In trying out various SQL  
> profiling configurations, I selectively load or comment out the  
> base modules in MyApp.pm:
>
> use Catalyst qw(lots of modules);
>
> In doing so I can test for their existence in the controllers:
>
> if ( $c->registered_plugins('DBIx::Class::QueryLog') ) {
>  do_something_with_DBIC-QueryLog
> }
>
> But how can I do the equivalent in the Model/Schema class, which  
> does not know anything about $c. I want to do something like:
>

Check CPAN for the Catalyst::Component::ACCEPT_CONTEXT module.

-- 
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire





More information about the Dbix-class mailing list