- or download this
package MyApp::DBConnection
use Moose;
...
has dbConnection (is => 'ro', isa => 'MyApp::DBConnection', default =>
+ sub { MyApp::DBConnection->new() });
1;
- or download this
package MyApp::DB::User;
use Moose;
...
sub runQuery {
return $shift->dbh->selectrow_array("sp_msforeachtable 'SELECT * F
+ROM \?'");
}
- or download this
#someplace in MyApp
sub doSomethingWithUser {
...
my $user = MyApp::DB::User->new({dbh => $self->DBConnection->dbh})
+;
1;
}