Advertisement
Guest User

Untitled

a guest
Jan 13th, 2014
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.37 KB | None | 0 0
  1.   my $connector = DBIx::Connector->new(
  2.     "dbi:mysql:database=".$self->{config}->{db}->{name}.';host='.$self->{config}->{db}->{host}.';port='.$self->{config}->{db}->{port},
  3.     $self->{config}->{db}->{user},
  4.     $self->{config}->{db}->{pass},
  5.     { AutoCommit => 1, }
  6.   );
  7.   $self->attr('dbh' => $connector->dbh);
  8.   $self->helper('db' => sub { return shift->dbh });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement