Skip to content

Commit 6d92e7f

Browse files
author
Chris White
committed
Update Makefile.PL
Updated dependencies; switched to dev version 0.1_2; cleaned up test files just a bit.
1 parent 2f05936 commit 6d92e7f

File tree

4 files changed

+53
-21
lines changed

4 files changed

+53
-21
lines changed

Makefile.PL

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
use 5.018;
22
use strict;
33
use warnings;
4+
use Config;
45
use ExtUtils::MakeMaker;
56

6-
sub MY::postamble {
7-
return "authortest:\n\tRELEASE_TESTING=1 prove -l xt";
8-
}
7+
# Get the filename of the Perl interpreter running this. Modified from perlvar.
8+
# The -x test is for cygwin or other systems where $Config{perlpath} has no
9+
# extension and $Config{_exe} is nonempty. E.g., symlink perl->perl5.10.1.exe.
10+
# There is no "perl.exe" on such a system.
11+
sub get_perl_filename {
12+
my $secure_perl_path = $Config{perlpath};
13+
if ($^O ne 'VMS') {
14+
$secure_perl_path .= $Config{_exe}
15+
unless (-x $secure_perl_path) ||
16+
($secure_perl_path =~ m/$Config{_exe}$/i);
17+
}
18+
return $secure_perl_path;
19+
} # get_perl_filename()
20+
21+
my $secure_perl_path = get_perl_filename();
22+
23+
sub MY::postamble { # TODO also handle Windows nmake syntax (SET vs. export)
24+
return <<EOT;
25+
authortest:
26+
\tRELEASE_TESTING=1 prove -l xt"
27+
28+
testhere: # Run the tests from lib rather than blib
29+
\t"$secure_perl_path" -Ilib -e 'use Test::Harness "runtests"; runtests \@ARGV;' -- t/*.t
30+
EOT
31+
} #postamble
932

1033
WriteMakefile(
1134
NAME => 'XML::Axk',
@@ -16,34 +39,44 @@ WriteMakefile(
1639
EXE_FILES => [ 'bin/axk' ],
1740
MIN_PERL_VERSION => '5.018',
1841
CONFIGURE_REQUIRES => {
42+
'Config' => '0',
1943
'ExtUtils::MakeMaker' => '0',
44+
'strict' => '0',
2045
'version' => '0.77',
46+
'warnings' => '0',
2147
},
22-
BUILD_REQUIRES => {
48+
TEST_REQUIRES => {
49+
'Capture::Tiny' => '0',
50+
'File::Spec' => '0',
51+
'Module::Loaded' => '0',
52+
'parent' => '0',
53+
'rlib' => '0',
2354
'Test::More' => '0.92',
2455
'Test::Kit' => '0',
2556
'Test::Class' => '0',
2657
'Test::Class::Load' => '0',
27-
'Capture::Tiny' => '0',
28-
'Module::Loaded' => '0',
29-
'File::Spec' => '0',
3058
},
3159
PREREQ_PM => {
60+
'Carp' => '0',
3261
'Data::Dumper' => '0',
62+
'Exporter' => '0',
3363
'Getopt::Long' => '2.50',
34-
'Pod::Usage' => '0',
35-
'Pod::Find' => '0',
36-
'Carp' => '0',
37-
#'Web::Query' => '0',
38-
#'Web::Query::LibXML' => '0',
64+
'Hash::Util::FieldHash' => '0',
65+
'HTML::Selector::XPath' => '0',
3966
'Import::Into' => '0',
40-
'Object::Tiny::XS' => '0',
41-
'Tie::Scalar' => '0',
67+
'Object::Tiny' => '0',
68+
'Pod::Find' => '0',
69+
'Pod::Usage' => '0',
4270
'Tie::Array' => '0',
4371
'Tie::Hash' => '0',
72+
'Tie::Scalar' => '0',
73+
'vars' => '0',
74+
#'Web::Query' => '0',
75+
#'Web::Query::LibXML' => '0',
76+
'XML::DOM' => '0',
4477
'XML::DOM::XPath' => '0',
4578
'XML::Handler::BuildDOM' => '0',
46-
'HTML::Selector::XPath' => '0',
79+
'XML::SAX::ParserFactory' => '0',
4780
#'XML::LibXML::jQuery' => '0',
4881
# Do I actually need full X::L::jQuery?
4982
},

lib/XML/Axk.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ use XML::Axk::Core v0.1.0;
88
use XML::Axk::App v0.1.0;
99
use Import::Into;
1010

11-
use version 0.77; our $VERSION = version->declare("v0.1.1");
11+
use version 0.77; our $VERSION = version->declare("v0.1_2");
12+
# underscore before last component => alpha version
1213

1314
sub import {
1415
XML::Axk::Core->import::into(1);

t/03-TODO.t

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ use strict;
55
use warnings;
66
use Test::More;
77

8-
ok(1,"Not here yet!");
9-
10-
done_testing();
8+
plan skip_all => 'Not here yet!';
119
__END__
1210
1311
./run -e 'perform { say $E; } xpath("//item"); perform { say $E; } xpath(q<//@attrname>);' ex/ex1.xml

t/06-class-tests.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
use 5.018;
55
use strict;
66
use warnings;
7-
use lib 't/lib';
8-
use Test::Class::Load qw(t/tests);
7+
use rlib;
8+
use Test::Class::Load (rlib::_dirs('tests'));
99
Test::Class->runtests;
1010

1111
# vi: set ts=4 sts=4 sw=4 et ai fdm=marker fdl=1: #

0 commit comments

Comments
 (0)