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

Graham Knop notifications at github.com
Sun Jan 28 12:56:38 GMT 2018


haarg commented on this pull request.



> -requires 'String::CamelCase'           => '0.02';
-requires 'Sub::Util'                   => '1.40';
-requires 'Try::Tiny'                   => 0;
-
-# core, but specific versions not available on older perls
-requires 'Digest::MD5'                 => '2.36';
-requires 'Exporter'                    => '5.63';
+sub _move_to {
+  my ($hash, $fromkey, $tokey) = @_;
+  $hash->{$tokey} = {
+    %{ $hash->{$tokey} || {} },
+    %{ delete($hash->{$fromkey}) || {} },
+  };
+}
+delete $eumm_args{META_MERGE} if $eumm_version < 6.45_01;
+_move_to(\%eumm_args, 'CONFIGURE_REQUIRES', 'PREREQ_PM')

This doesn't accomplish much.  It's too late for configure prereqs to be satisfied here.  Deleting `CONFIGURE_REQUIRES` to silence the warning is the only useful thing that can be done.

> -requires 'Exporter'                    => '5.63';
+sub _move_to {
+  my ($hash, $fromkey, $tokey) = @_;
+  $hash->{$tokey} = {
+    %{ $hash->{$tokey} || {} },
+    %{ delete($hash->{$fromkey}) || {} },
+  };
+}
+delete $eumm_args{META_MERGE} if $eumm_version < 6.45_01;
+_move_to(\%eumm_args, 'CONFIGURE_REQUIRES', 'PREREQ_PM')
+  if $eumm_version < 6.51_03;
+_move_to(\%eumm_args, 'BUILD_REQUIRES', 'PREREQ_PM')
+  if $eumm_version < 6.55_01;
+$eumm_args{NO_MYMETA} = 1
+  if $eumm_version >= 6.57_02 and $eumm_version < 6.57_07;
+_move_to(\%eumm_args, 'TEST_REQUIRES', 'PREREQ_PM')

This should move the prereqs to `BUILD_REQUIRES` and be moved before `BUILD_REQUIRES` gets conditionally moved to `PREREQ_PM`.

> +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);

I think this is a confusing way to communicate with the rest of the `Makefile.PL`.

> @@ -2,67 +2,103 @@ use warnings;
 use strict;
 
 use 5.008001;
-BEGIN { unshift @INC, '.' unless $INC[-1] eq '.'; }
-use inc::Module::Install 1.00;
-
-use Getopt::Long();
-
-my $getopt = Getopt::Long::Parser->new(
-    config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
+use ExtUtils::MakeMaker;
+our (%dev_requires, %runtime_suggests);
+(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
+
+my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
+my %eumm_args = (
+    NAME => 'DBIx::Class::Schema::Loader',
+    AUTHOR => 'Caelum: Rafael Kitover <rkitover at cpan.org>',

Redundant with Distar's author handing.

-- 
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-92051683
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20180128/6d5febd6/attachment.htm>


More information about the DBIx-Class-Devel mailing list