11 use Text::Tradition::Directory;
13 ## We're loading the besoin data, and dumping the backend db rows into
14 ## a .sql file for load testing (testing of data loading, not the
16 my $sql = 't/data/speed_test_load.sql';
17 my $uuid = 'load-test';
19 print "Loading t/data/besoin.xml and storing it in $sql ...\n";
21 ## Load tradition data:
22 my $tradition = Text::Tradition->new(
24 'file' => "t/data/besoin.xml"
26 $tradition->add_stemma(dotfile => "t/data/besoin.dot");
29 my $fh = File::Temp->new();
30 my $file = $fh->filename;
33 my $dsn = "dbi:SQLite:$file";
34 my $dir = Text::Tradition::Directory->new(
36 extra_args => { create => 1 },
38 my $scope = $dir->new_scope;
39 $dir->store($uuid, $tradition);
42 `sqlite3 $file ".dump" > $sql`;
44 print "$sql updated,\n";