<div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 8, 2017 at 6:15 PM, Robert Brown <span dir="ltr"><<a href="mailto:rob@intelcompute.com" target="_blank">rob@intelcompute.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jen,<br>
<br>
You can use MyApp::Schema outside of Catalyst:<br>
<br>
my $schema = MyApp::Schema->connect( $ENV{ LIVE } ? 'live' : 'dev' );<br>
<br>
(I'm additionally using DBIx::Class::Schema::Config to be able to connect to different servers by using different config files)<br>
<br>
$schema->resultset('Instance')<wbr>->search_rs(), etc.<br>
<br></blockquote></div><br></div><div class="gmail_extra">If you want to reuse the configuration from <span style="font-family:monospace,monospace">MyApp</span>:<br><br><span style="font-family:monospace,monospace">use MyApp;<br>my $schema = MyApp->model('DBICModelName')->schema;<br></span><br></div><div class="gmail_extra">You may need to adjust <span style="font-family:monospace,monospace">@INC</span> accordingly, etc.<br></div></div></div></div>