package DBIx::Class::Schema::Loader::DBI::Writing;
use strict;
+use warnings;
our $VERSION = '0.07043';
use strict;
+use warnings;
use Test::More tests => 10;
BEGIN {
use strict;
+use warnings;
use Test::More;
use lib qw(t/lib);
use dbixcsl_common_tests;
use strict;
+use warnings;
use Test::More;
use Test::Warn;
use DBIx::Class::Schema::Loader::Optional::Dependencies;
use strict;
+use warnings;
use Test::More;
use lib qw(t/lib);
use make_dbictest_db;
use strict;
+use warnings;
use Test::More;
use Test::Exception;
use Test::Warn;
classname => 'DBICTest::Schema::_no_skip_load_external',
regexes => {
Foo => [
- qr/package DBICTest::Schema::_no_skip_load_external::Foo;\nour \$skip_me = "bad mojo";\n1;/
+ qr/package DBICTest::Schema::_no_skip_load_external::Foo;.*\nour \$skip_me = "bad mojo";\n1;/s
],
},
);
},
neg_regexes => {
Foo => [
- qr/package DBICTest::Schema::_skip_load_external::Foo;\nour \$skip_me = "bad mojo";\n1;/
+ qr/package DBICTest::Schema::_skip_load_external::Foo;.*\nour \$skip_me = "bad mojo";\n1;/s
],
},
);
-skip_all_without => 'use_moose';
use strict;
+use warnings;
use Test::More;
use strict;
+use warnings;
use DBIx::Class::Schema::Loader;
use DBIx::Class::Schema::Loader::Utils 'slurp_file';
use File::Path;
use strict;
+use warnings;
use Test::More;
use Test::Exception;
use Test::Warn;
use strict;
+use warnings;
use Test::More;
use Test::Exception;
use Try::Tiny;
# by Mark Hedges ( hedges -at| scriptdolphin.com )
use strict;
+use warnings;
use Test::More tests => 7 * 5;
use Test::Exception;
-skip_all_without => 'test_backcompat';
use strict;
+use warnings;
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use dbixcsl_test_dir qw/$tdir/;
-skip_all_without => qw(test_backcompat test_rdbms_mysql);
use strict;
+use warnings;
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-skip_all_without => qw(test_backcompat test_rdbms_pg);
use strict;
+use warnings;
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-skip_all_without => qw(test_backcompat test_rdbms_db2);
use strict;
+use warnings;
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-skip_all_without => qw(test_backcompat test_rdbms_oracle);
use strict;
+use warnings;
use lib qw(t/backcompat/0.04006/lib);
use dbixcsl_common_tests;
use Test::More;
-skip_all_without => 'test_backcompat';
use strict;
+use warnings;
use Test::More;
use lib qw(t/backcompat/0.04006/lib);
use make_dbictest_db;
-skip_all_without => 'test_backcompat';
use strict;
+use warnings;
use Test::More;
use lib qw(t/backcompat/0.04006/lib);
use make_dbictest_db;
-skip_all_without => 'test_backcompat';
use strict;
+use warnings;
use Test::More;
use lib qw(t/backcompat/0.04006/lib);
use File::Path;
-skip_all_without => 'test_backcompat';
use strict;
+use warnings;
use Test::More;
use lib qw(t/backcompat/0.04006/lib);
use File::Path;
package DBIXCSL_Test::Schema::LoaderTest1;
+use strict;
+use warnings;
sub loader_test1_classmeth { 'all is well' }
package DBIx::Class::TestComponent;
+use strict;
+use warnings;
sub dbix_class_testcomponent { 'dbix_class_testcomponent works' }
package My::ResultBaseClass;
+use strict;
+use warnings;
use base 'DBIx::Class::Core';
package My::SchemaBaseClass;
+use strict;
+use warnings;
use base 'DBIx::Class::Schema';
package TestAdditional;
+use strict;
+use warnings;
sub test_additional { return "test_additional"; }
package TestAdditionalBase;
+use strict;
+use warnings;
sub test_additional_base { return "test_additional_base"; }
sub test_additional_base_override { return "test_additional_base_override"; }
package TestLeftBase;
+use strict;
+use warnings;
sub test_additional_base_override { return "test_left_base_override"; }
package DBICTest::Schema::_no_skip_load_external::Foo;
+use strict;
+use warnings;
+
our $skip_me = "bad mojo";
1;
package DBICTest::Schema::_skip_load_external::Foo;
+use strict;
+use warnings;
+
our $skip_me = "bad mojo";
1;
package DBIXCSL_Test::Schema::MyResult::LoaderTest1;
+use strict;
+use warnings;
sub loader_test1_classmeth { 'all is well' }
package DBIx::Class::TestComponent;
+use strict;
+use warnings;
sub dbix_class_testcomponent { 'dbix_class_testcomponent works' }
package DBIx::Class::TestComponentForMap;
+use strict;
+use warnings;
sub dbix_class_testcomponentmap { 'dbix_class_testcomponentmap works' }
package My::ResultBaseClass;
+use strict;
+use warnings;
+
use base 'DBIx::Class::Core';
1;
package My::SchemaBaseClass;
+use strict;
+use warnings;
+
use base 'DBIx::Class::Schema';
1;
package TestAdditional;
+use strict;
+use warnings;
sub test_additional { return "test_additional"; }
package TestAdditionalBase;
+use strict;
+use warnings;
sub test_additional_base { return "test_additional_base"; }
sub test_additional_base_override { return "test_additional_base_override"; }
package TestComponentFQN;
+use strict;
+use warnings;
sub testcomponent_fqn { 'TestComponentFQN works' }
package TestComponentForMapFQN;
+use strict;
+use warnings;
sub testcomponentformap_fqn { 'TestComponentForMapFQN works' }
package TestLeftBase;
+use strict;
+use warnings;
sub test_additional_base_override { return "test_left_base_override"; }
package TestSchemaBaseClass;
-use base DBIx::Class::Schema;
+use strict;
+use warnings;
+
+use base 'DBIx::Class::Schema';
our $test_ok = 0;
package TestSchemaComponentFQN;
+use strict;
+use warnings;
sub testschemacomponent_fqn { 'TestSchemaComponentFQN works' }
package dbixcsl_dumper_tests;
use strict;
+use warnings;
use Test::More;
use File::Path;
use IPC::Open3;
--- /dev/null
+use DBIx::Class::Schema::Loader::Optional::Dependencies
+ -skip_all_without => 'test_strictures';
+
+use warnings;
+use strict;
+
+use Test::More;
+use File::Find;
+use lib 't/lib';
+
+# The rationale is - if we can load all our optdeps
+# that are related to lib/ - then we should be able to run
+# perl -c checks (via syntax_ok), and all should just work
+my $missing_groupdeps_present = grep
+ { DBIx::Class::Schema::Loader::Optional::Dependencies->req_ok_for($_) }
+ grep
+ { $_ !~ /^ (?: test | rdbms | dist ) _ /x }
+ keys %{DBIx::Class::Schema::Loader::Optional::Dependencies->req_group_list}
+;
+
+find({
+ wanted => sub {
+ -f $_ or return;
+ m/\.(?: pm | pl | t )$ /ix or return;
+
+ return if m{^(?:
+ lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm # no stictures by design (load speed sensitive)
+ )$}x;
+
+ my $f = $_;
+
+ Test::Strict::strict_ok($f);
+ Test::Strict::warnings_ok($f);
+
+ Test::Strict::syntax_ok($f)
+ if ! $missing_groupdeps_present and $f =~ /^ (?: lib )/x;
+ },
+ no_chdir => 1,
+}, (qw(lib t script maint)) );
+
+done_testing;