Skip to content

Instantly share code, notes, and snippets.

@metaperl
Created August 18, 2009 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaperl/169859 to your computer and use it in GitHub Desktop.
Save metaperl/169859 to your computer and use it in GitHub Desktop.
package Sakila::DBH;
use strict;
my $dbfile = "$ENV{SAKILA}/schema.sqlite3";
our %c =
(
dsn => "dbi:SQLite:$dbfile",
user => '',
pass => ''
);
sub dbh {
use DBI;
my $dbh = DBI->connect( $c{dsn}, '', '', { RaiseError => 1 } ) ;
}
sub connect_data {
\%c;
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment