in reply to Re: Can't locate object method...
in thread Can't locate object method...

As the first line of DBI::connect() is my $class = shift;, what do you expect your code to do?