I think I'm missing something here, but isn't this as easy as making sure that TartLib's dbi connection variable is in the EXPORT list, or you provide a function that returns it if you want better encapsulation?: eg...
my $sth = TArtLib::dbi->prepare("select * from table") or die DBI::err
+str;
my $sth2 = TArtLib->dbi()->prepare("select * from table") or die DBI::
+errstr;
What's confusing is that you say you want it from the persistent connection from the command line as you'd get from running Apache::DBI. Unless you have an aspect of your program that will be running constantly acting as a server, I don't see how you can get this, as TArtLib will be initialized every runtime from the command line, reconnecting it to the database. Maybe I'm just mistaken here.
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain