<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">&lt;<a href="mailto:rob@intelcompute.com" target="_blank">rob@intelcompute.com</a>&gt;</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-&gt;connect( $ENV{ LIVE } ? &#39;live&#39; : &#39;dev&#39; );<br>
<br>
(I&#39;m additionally using DBIx::Class::Schema::Config to be able to connect to different servers by using different config files)<br>
<br>
$schema-&gt;resultset(&#39;Instance&#39;)<wbr>-&gt;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-&gt;model(&#39;DBICModelName&#39;)-&gt;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>