# on error
# The EUMM build-stage generation will run unconditionally and
# errors will not be trapped
-if (my $out = ` "$^X" -Ilib maint/gen_schema `) {
- open (my $fh, '>:unix', $ddl_fn) or die "Unable to open $ddl_fn: $!";
- print $fh $out;
- close $fh;
+require DBIx::Class::Optional::Dependencies;
+if ( DBIx::Class::Optional::Dependencies->req_ok_for ('deploy') ) {
+ print "Regenerating t/lib/sqlite.sql\n";
+ if (my $out = ` "$^X" -Ilib maint/gen_schema `) {
+ open (my $fh, '>:unix', $ddl_fn) or die "Unable to open $ddl_fn: $!";
+ print $fh $out;
+ close $fh;
+ }
}
postamble <<"EOP";
@{[ $crlf_fixup->($ddl_fn) ]}
EOP
-
-
# keep the Makefile.PL eval happy
1;