Hello,<br><br>I've found that It's often desired to reuse Jifty Models in off-line database importing/exporting scripts. Currently I'm using the following piece of code in my Qooqle project's off-line scripts:<br><br> use UNIVERSAL::require;
<br> use Jifty::Config;<br> use Jifty::ClassLoader;<br><br> BEGIN {<br> Jifty::ClassLoader->new(base => 'Qooqle')->require;<br> }<br><br> my $config = Jifty::Config->new;<br> $config->load;
<br> my $db_config = $config->framework('Database');<br> use Jifty::DBI::Handle;<br> my $handle = Jifty::DBI::Handle->new();<br> $handle->connect(<br> driver => $db_config->{Driver},<br>
database => $db_config->{Database},<br> user => $db_config->{User},<br> password => $db_config->{Password},<br> );<br> Jifty->new( handle => $handle );<br><br>Yes, it's ugly, but I can't make it shorter. What's the best practice for doing this in the Jifty world?
<br><br>Thanks!<br>Agent<br>