Skip to content

Commit

Permalink
use strict and warnings in Makefile.PL
Browse files Browse the repository at this point in the history
Update the file accordingly
  • Loading branch information
shawnlaffan committed Dec 19, 2023
1 parent c6be1b1 commit 1d789f5
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
use strict;
use warnings;

my $have_alien;
BEGIN {
my $gdal = 'Alien::gdal';
my @argv = ();
Expand Down Expand Up @@ -27,10 +31,12 @@ BEGIN {
my $lib = $a[0];
my $data = "$gdal/share/gdal";
print "I'm creating Geo::GDAL::gdal as a wrapper to $lib, which I believe is GDAL $version.\n";
$fh = new IO::File;
my $fh = IO::File->new;
$fh->open("lib/Geo/GDAL/gdal.pm","w");
print $fh <<EOF;
package Geo::GDAL::gdal;
use strict;
use warnings;
sub new {
return shift;
}
Expand All @@ -48,27 +54,33 @@ EOF
} else {
eval "use Alien::Base::Wrapper qw(Alien::gdal !export)";
$have_alien = 1;
$fh = new IO::File;
my $fh = IO::File->new;
$fh->open("lib/Geo/GDAL/gdal.pm","w");
print $fh <<EOF;
package Geo::GDAL::gdal;
use strict;
use warnings;
1;
EOF
}
}
use ExtUtils::MakeMaker;
use Config;
%args = (
my %args = (
AUTHOR => ['Ari Jolma <ari.jolma at gmail.com>'],
NAME => 'Geo::GDAL::FFI',
ABSTRACT_FROM => "lib/Geo/GDAL/FFI.pm",
VERSION_FROM => "lib/Geo/GDAL/FFI.pm",
LICENSE => "artistic_2",
CONFIGURE_REQUIRES => {
Alien::gdal => 0,
'Alien::gdal' => 0,
},
PREREQ_PM => {
PkgConfig => 0.23026,
FFI::Platypus => 0,
PDL => 0,
Sort::Versions => 0,
Alien::gdal => 0,
'PkgConfig' => 0.23026,
'FFI::Platypus' => 0,
'PDL' => 0,
'Sort::Versions' => 0,
'Alien::gdal' => 0,
},
TEST_REQUIRES => {
'Test::More' => 0,
Expand All @@ -91,7 +103,7 @@ use Config;
},
);
if ($have_alien) {
%agrs = (%args, Alien::Base::Wrapper->mm_args);
%args = (%args, Alien::Base::Wrapper->mm_args);
}

WriteMakefile(%args);

0 comments on commit 1d789f5

Please sign in to comment.