Help for this page

Select Code to Download


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