Skip to content

Commit 74df90e

Browse files
author
Ahmad Shahba
committed
Applied changes suggested by @mohawk2
1 parent 643441e commit 74df90e

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

Makefile.PL

+2-17
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,6 @@ $LIBS .= " -lz" if($zLib);
115115
$LIBS .= " -ljpeg" if($jpegLib);
116116
$LIBS .= " -lm";
117117

118-
# Extract package version from HDF5.pm
119-
my $packageVersion;
120-
{
121-
open my $fh, '<', 'HDF5.pm' or die 'Could not open HDF5.pm for reading';
122-
while (<$fh>) {
123-
if(/\$PDL::IO::HDF5::VERSION\h*=\h*('|")([\d.]+)\g1/) {
124-
$packageVersion = $2;
125-
last;
126-
}
127-
}
128-
close $fh
129-
}
130-
die "Could not extract package version from HDF5.pm" unless defined $packageVersion;
131-
132118

133119
my $package = ["hdf5.pd",'HDF5','PDL::IO::HDF5'];
134120
my $meta_merge = {
@@ -140,7 +126,6 @@ my $meta_merge = {
140126
'Andrew Benson <abenson AT obs.carnegiescience.edu>',
141127
],
142128
'license' => [ 'perl_5' ],
143-
'version' => $packageVersion,
144129
'meta_spec' => {
145130
'version' => '2',
146131
'url' => 'http://search.cpan.org/perldoc?CPAN::Meta::Spec',
@@ -170,7 +155,7 @@ my $meta_merge = {
170155
},
171156
},
172157
resources => {
173-
license => [ "http://cpansearch.perl.org/src/CHM/PDL-IO-HDF5-$packageVersion/COPYRIGHT" ],
158+
license => [ 'the same terms as Perl' ],
174159
homepage => 'http://pdl.perl.org/',
175160
bugtracker => {
176161
web => 'https://github.com/PDLPorters/pdl-io-hdf5/issues',
@@ -198,7 +183,7 @@ WriteMakefile(
198183
# 'TEST_REQUIRES' => { PDL => '2.004' },
199184
'PREREQ_PM' => { PDL => '2.004' },
200185
'LICENSE' => 'perl',
201-
'VERSION_FROM' => 'hdf5.pd',
186+
'VERSION_FROM' => 'HDF5.pm',
202187
'META_MERGE' => $meta_merge,
203188
'TYPEMAPS' => [&PDL_TYPEMAP()],
204189
'OBJECT' => 'HDF5.o ',

0 commit comments

Comments
 (0)