| DBIx-Class-Helpers documentation | Contained in the DBIx-Class-Helpers distribution. |
In your dist.ini:
[CompileTests]
skip = Test$
This is an extension of Dist::Zilla::Plugin::InlineFiles, providing the following files:
This test will find all modules and scripts in your dist, and try to compile them one by one. This means it's a bit slower than loading them all at once, but it will catch more errors.
This plugin accepts the following options:
Foo::Bar), not the file path
(lib/Foo/Bar.pm).| DBIx-Class-Helpers documentation | Contained in the DBIx-Class-Helpers distribution. |
package inc::Dist::Zilla::Plugin::DBICSgen; use strict; use warnings; # ABSTRACT: common tests to check syntax of your modules use Moose; use Class::MOP; require lib; with 'Dist::Zilla::Role::FileGatherer'; has schema => ( is => 'ro', isa => 'Str', required => 1, ); has lib => ( is => 'rw', isa => 'ArrayRef', default => sub { [qw{lib}] }, ); sub mvp_multivalue_args { qw(lib) } unlink 't/lib/ddl.sql'; sub gather_files { my $self = shift; lib->import(@{$self->lib}); my $schema = $self->schema; Class::MOP::load_class($schema); $schema->generate_ddl; my $file = Dist::Zilla::File::OnDisk->new(name => $schema->ddl_filename); $self->add_file($file); } no Moose; __PACKAGE__->meta->make_immutable; 1;