Created
August 18, 2009 18:17
-
-
Save metaperl/169866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use lib "$ENV{SHOOTOUT}/lib"; | |
use lib "$ENV{SAKILA}"; | |
use lib "$ENV{SAKILA}/DBIx/Class"; | |
use SakSchema; # mysql source | |
use Sak2Schema; # sqlite target | |
use Sakila::DBH::MySQL; | |
my $mysql_schema = SakSchema->connect | |
( | |
sub { Sakila::DBH::MySQL->dbh }, {} | |
); | |
warn $mysql_schema; | |
my $sqlite_schema = Sak2Schema->connect | |
( | |
sub { Sakila::DBH::dbh } | |
); | |
warn $sqlite_schema; | |
my $rs = $mysql_schema->resultset('Actor')->search; | |
while (my $x = $rs->next) { | |
warn $x->first_name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment