Reduce mount of perlgolf in ResultSet.pm
[dbsrgits/DBIx-Class.git] / maint / gen-schema.pl
index b16bd15..e3faa85 100755 (executable)
@@ -1,22 +1,17 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;
 use lib qw(lib t/lib);
 
-use UNIVERSAL::require;
+use DBICTest::Schema;
+use SQL::Translator;
 
-my $from = 'SQL::Translator::Parser::DBIx::Class';
-my $to = 'SQL::Translator::Producer::SQLite';
-my $sqlt = 'SQL::Translator';
-my $schema = 'DBICTest::Schema';
-
-$from->require;
-$to->require;
-$sqlt->require;
-$schema->require;
-
-my $tr = $sqlt->new;
-
-$from->can("parse")->($tr, $schema);
-print $to->can("produce")->($tr);
+my $schema = DBICTest::Schema->connect;
+print scalar ($schema->storage->deployment_statements(
+  $schema,
+  'SQLite',
+  undef,
+  undef,
+  { producer_args => { no_transaction => 1 } }
+));