[DBIx-Class-Devel] [dbsrgits/dbix-class-schema-loader] Port to Distar (#17)

Dagfinn Ilmari Mannsåker notifications at github.com
Mon Jan 29 13:18:55 GMT 2018


ilmari commented on this pull request.



> +    EXE_FILES => [ qw(script/dbicdump) ],
+    META_MERGE => {
+        "meta-spec" => { version => 2 },
+        dynamic_config => 0,
+        resources => {
+            repository => {
+                type => 'git',
+                url => 'git at github.com/dbsrgits/dbix-class-schema-loader.git',
+                web => 'https://github.com/dbsrgits/dbix-class-schema-loader',
+            },
+            x_IRC => 'irc://irc.perl.org/#dbix-class',
+            license => [ 'http://dev.perl.org/licenses/' ],
+            x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class',
+        },
+        no_index => {
+            directory => [qw(maint xt)],

PAUSE already doesn't index anything in `inc`, `xt`, and `t`, so I think we should either list `t` explicitly here for completeness, or only explicitly list `maint` for conciseness.

> +
+author 'Caelum: Rafael Kitover <rkitover at cpan.org>';
+
+manifest_include 't/backcompat/0.04006/lib' => qr/.*\.pm$/;
+manifest_include 't/bin' => qr/.*/;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+require DBIx::Class::Schema::Loader::Optional::Dependencies;
+my $optdeps = 'DBIx::Class::Schema::Loader::Optional::Dependencies';
+my @req_groups = keys %{ $optdeps->req_group_list };
+my @rdbms_groups = grep { /rdbms/ } @req_groups;
+my @other_groups = grep { !/rdbms/ } @req_groups;
+our (%dev_requires, %runtime_suggests);
+%dev_requires = %{ $optdeps->modreq_list_for(\@other_groups) };
+%runtime_suggests = %{ $optdeps->modreq_list_for(\@rdbms_groups) };

We don't currently suggest any of the RDBMS-specific modules, and I'd like to keep actual behaviour changes to a minimum in this PR.  If we want to further tweak the deps, that should be a separate discussion.

> +use lib 'Distar/lib';
+use Distar 0.001;
+
+author 'Caelum: Rafael Kitover <rkitover at cpan.org>';
+
+manifest_include 't/backcompat/0.04006/lib' => qr/.*\.pm$/;
+manifest_include 't/bin' => qr/.*/;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+require DBIx::Class::Schema::Loader::Optional::Dependencies;
+my $optdeps = 'DBIx::Class::Schema::Loader::Optional::Dependencies';
+my @req_groups = keys %{ $optdeps->req_group_list };
+my @rdbms_groups = grep { /rdbms/ } @req_groups;
+my @other_groups = grep { !/rdbms/ } @req_groups;
+our (%dev_requires, %runtime_suggests);

One option would be to return a hash from the script and do something like
```
my %dev_requires = -f 'META.yml' ? () : (do './maint/Makefile.PL.include' or die $@);
```
in `Makefile.PL`, but I'm not entirely sure I like that either.

> +    },
+    realclean => {
+        FILES => 'lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod'
+    },
+    EXE_FILES => [ qw(script/dbicdump) ],
+    META_MERGE => {
+        "meta-spec" => { version => 2 },
+        dynamic_config => 0,
+        resources => {
+            repository => {
+                type => 'git',
+                url => 'git at github.com/dbsrgits/dbix-class-schema-loader.git',
+                web => 'https://github.com/dbsrgits/dbix-class-schema-loader',
+            },
+            x_IRC => 'irc://irc.perl.org/#dbix-class',
+            license => [ 'http://dev.perl.org/licenses/' ],

Doesn't EUMM automatically generate this from the `LICENSE => 'perl'` above?

> +        'ExtUtils::MakeMaker' => '0',
+    },
+    TEST_REQUIRES => {
+        'DBD::SQLite'     => '1.29',
+        'Test::Exception' => '0.31',
+        'Test::More'      => '0.94',
+        'Test::Warn'      => '0.21',
+        'Test::Deep'      => '0.107',
+        'Test::Differences' => '0.60',
+        # temporary, needs to be thrown out
+        'DBIx::Class::IntrospectableM2M' => 0,
+        # core, but specific versions not available on older perls
+        'File::Temp'      => '0.16',
+        'File::Path'      => '2.07',
+    },
+    test => {TESTS => 't/*.t t/*/*.t'},

This needs to include `t/*/*/*.t`, since the backcompat tests are two directories deep. There aren't actually any files matching `t/*/*.t`, but I guess it doesn't hurt to include it for future-proofing.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class-schema-loader/pull/17#pullrequestreview-92192020
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20180129/e6127198/attachment.htm>


More information about the DBIx-Class-Devel mailing list