New upstream release.
Debian Janitor
1 year, 19 days ago
0 | language: perl | |
1 | perl: | |
2 | - blead # builds perl from git | |
3 | - dev # latest point release | |
4 | - '5.26' | |
5 | - '5.24' | |
6 | - '5.22' | |
7 | - '5.20' | |
8 | - '5.18' | |
9 | - '5.16' | |
10 | - '5.14' | |
11 | - '5.12' | |
12 | - '5.10' | |
13 | - '5.8' | |
14 | before_install: | |
15 | - git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers | |
16 | - source ~/travis-perl-helpers/init | |
17 | - build-perl | |
18 | - perl -V | |
19 | - build-dist | |
20 | - cd $BUILD_DIR | |
21 | install: | |
22 | - cpan-install YAML::Tiny File::Remove Module::Build Module::ScanDeps Parse::CPAN::Meta | |
23 | script: | |
24 | - perl Makefile.PL | |
25 | - make | |
26 | - prove -b -r -s -j1 $(test-files) |
0 | 0 | Changes for Perl programming language extension Module-Install |
1 | ||
2 | 1.21 2023-04-28 | |
3 | - fix tests broken by Module::Install::DSL removal | |
4 | ||
5 | 1.20 2023-04-27 | |
6 | - Module::Install::DSL has been removed, as its use is highly discouraged. | |
1 | 7 | |
2 | 8 | 1.19 2017-12-19 |
3 | 9 | - remove use of INIT phase in Module::Install::DSL, to fix issues on perl |
0 | 0 | .ackrc |
1 | 1 | .mailmap |
2 | .travis.yml | |
3 | 2 | Changes |
4 | 3 | lib/inc/Module/Install.pm |
5 | lib/inc/Module/Install/DSL.pm | |
6 | 4 | lib/Module/AutoInstall.pm |
7 | 5 | lib/Module/Install.pm |
8 | 6 | lib/Module/Install.pod |
23 | 21 | lib/Module/Install/Can.pm |
24 | 22 | lib/Module/Install/Compiler.pm |
25 | 23 | lib/Module/Install/Deprecated.pm |
26 | lib/Module/Install/DSL.pm | |
27 | 24 | lib/Module/Install/External.pm |
28 | 25 | lib/Module/Install/FAQ.pod |
29 | 26 | lib/Module/Install/Fetch.pm |
52 | 49 | t/05_share.t |
53 | 50 | t/06_ppport.t |
54 | 51 | t/07_perl_version.t |
55 | t/08_dsl.t | |
56 | 52 | t/09_read.t |
57 | 53 | t/10_test.t |
58 | 54 | t/11_extraction.t |
11 | 11 | YAML::Tiny: '1.33' |
12 | 12 | distribution_type: module |
13 | 13 | dynamic_config: 0 |
14 | generated_by: 'Module::Install version 1.19' | |
14 | generated_by: 'Module::Install version 1.21' | |
15 | 15 | license: perl |
16 | 16 | meta-spec: |
17 | 17 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
46 | 46 | resources: |
47 | 47 | license: http://dev.perl.org/licenses/ |
48 | 48 | repository: https://github.com/Perl-Toolchain-Gang/Module-Install.git |
49 | version: '1.19' | |
49 | version: '1.21' | |
50 | 50 | x_contributors: |
51 | 51 | - 'Adam Kennedy <adam@ali.as>' |
52 | 52 | - 'Kenichi Ishigaki <ishigaki@cpan.org>' |
0 | libmodule-install-perl (1.21-1) UNRELEASED; urgency=low | |
1 | ||
2 | * New upstream release. | |
3 | ||
4 | -- Debian Janitor <janitor@jelmer.uk> Tue, 02 May 2023 01:51:57 -0000 | |
5 | ||
0 | 6 | libmodule-install-perl (1.19-2) unstable; urgency=medium |
1 | 7 | |
2 | 8 | [ Salvatore Bonaccorso ] |
6 | 6 | |
7 | 7 | use vars qw{$VERSION}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | } |
11 | 11 | |
12 | 12 | # special map on pre-defined feature sets |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = qw{Module::Install::Base}; |
9 | 9 | } |
10 | 10 |
6 | 6 | |
7 | 7 | use vars qw{$VERSION @ISA}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | @ISA = qw{Module::Install::Base}; |
11 | 11 | } |
12 | 12 |
4 | 4 | use Module::Install::Base (); |
5 | 5 | use vars qw{$VERSION @ISA}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = qw(Module::Install::Base); |
9 | 9 | } |
10 | 10 |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = qw{Module::Install::Base}; |
9 | 9 | } |
10 | 10 |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.19'; | |
8 | $VERSION = '1.21'; | |
9 | 9 | @ISA = qw{Module::Install::Base}; |
10 | 10 | } |
11 | 11 |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = qw{Module::Install::Base}; |
9 | 9 | } |
10 | 10 |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.19'; | |
8 | $VERSION = '1.21'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | } |
11 | 11 |
3 | 3 | use Module::Install::Base (); |
4 | 4 | use vars qw{$VERSION @ISA}; |
5 | 5 | BEGIN { |
6 | $VERSION = '1.19'; | |
6 | $VERSION = '1.21'; | |
7 | 7 | @ISA = qw(Module::Install::Base); |
8 | 8 | } |
9 | 9 |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = qw{Module::Install::Base}; |
9 | 9 | } |
10 | 10 |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.19'; | |
8 | $VERSION = '1.21'; | |
9 | 9 | @ISA = 'Module::Install'; |
10 | 10 | } |
11 | 11 |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
2 | 2 | use strict 'vars'; |
3 | 3 | use vars qw{$VERSION}; |
4 | 4 | BEGIN { |
5 | $VERSION = '1.19'; | |
5 | $VERSION = '1.21'; | |
6 | 6 | } |
7 | 7 | |
8 | 8 | # Suspend handler for "redefined" warnings |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.19'; | |
8 | $VERSION = '1.21'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
6 | 6 | |
7 | 7 | use vars qw{$VERSION @ISA $ISCORE}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | @ISA = 'Module::Install::Base'; |
11 | 11 | $ISCORE = 1; |
12 | 12 | } |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.19'; | |
8 | $VERSION = '1.21'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
0 | package Module::Install::DSL; | |
1 | ||
2 | use strict; | |
3 | use vars qw{$VERSION $ISCORE}; | |
4 | BEGIN { | |
5 | $VERSION = '1.19'; | |
6 | $ISCORE = 1; | |
7 | *inc::Module::Install::DSL::VERSION = *VERSION; | |
8 | @inc::Module::Install::DSL::ISA = __PACKAGE__; | |
9 | } | |
10 | ||
11 | sub import { | |
12 | # Read in the rest of the Makefile.PL | |
13 | open 0 or die "Couldn't open $0: $!"; | |
14 | my $dsl; | |
15 | SCOPE: { | |
16 | local $/ = undef; | |
17 | $dsl = join "", <0>; | |
18 | } | |
19 | ||
20 | # Change inc::Module::Install::DSL to the regular one. | |
21 | # Remove anything before the use inc::... line. | |
22 | $dsl =~ s/.*?^\s*use\s+(?:inc::)?Module::Install::DSL(\b[^;]*);\s*\n//sm; | |
23 | ||
24 | # Load inc::Module::Install as we would in a regular Makefile.Pl | |
25 | SCOPE: { | |
26 | package main; | |
27 | require inc::Module::Install; | |
28 | inc::Module::Install->import; | |
29 | } | |
30 | ||
31 | # Add the ::DSL plugin to the list of packages in /inc | |
32 | my $admin = $Module::Install::MAIN->{admin}; | |
33 | if ( $admin ) { | |
34 | my $from = $INC{"$admin->{path}/DSL.pm"}; | |
35 | my $to = "$admin->{base}/$admin->{prefix}/$admin->{path}/DSL.pm"; | |
36 | $admin->copy( $from => $to ); | |
37 | } | |
38 | ||
39 | # Convert the basic syntax to code | |
40 | my $code = "{\n" | |
41 | . "package main;\n\n" | |
42 | . dsl2code($dsl) | |
43 | . "\n\nWriteAll();\n" | |
44 | . "}\n"; | |
45 | ||
46 | # Execute the script | |
47 | eval $code; | |
48 | print STDERR "Failed to execute the generated code...\n$@" if $@; | |
49 | ||
50 | exit(0); | |
51 | } | |
52 | ||
53 | sub dsl2code { | |
54 | my $dsl = shift; | |
55 | ||
56 | # Split into lines and strip blanks | |
57 | my @lines = grep { /\S/ } split /[\012\015]+/, $dsl; | |
58 | ||
59 | # Each line represents one command | |
60 | my @code = (); | |
61 | my $static = 1; | |
62 | foreach my $line ( @lines ) { | |
63 | # Split the lines into tokens | |
64 | my @tokens = split /\s+/, $line; | |
65 | ||
66 | # The first word is the command | |
67 | my $command = shift @tokens; | |
68 | my @params = (); | |
69 | my @suffix = (); | |
70 | while ( @tokens ) { | |
71 | my $token = shift @tokens; | |
72 | if ( $token eq 'if' or $token eq 'unless' ) { | |
73 | # This is the beginning of a suffix | |
74 | push @suffix, $token; | |
75 | push @suffix, @tokens; | |
76 | ||
77 | # The conditional means this distribution | |
78 | # can no longer be considered fully static. | |
79 | $static = 0; | |
80 | last; | |
81 | } else { | |
82 | # Convert to a string | |
83 | $token =~ s/([\\\'])/\\$1/g; | |
84 | push @params, "'$token'"; | |
85 | } | |
86 | }; | |
87 | ||
88 | # Merge to create the final line of code | |
89 | @tokens = ( $command, @params ? join( ', ', @params ) : (), @suffix ); | |
90 | push @code, join( ' ', @tokens ) . ";\n"; | |
91 | } | |
92 | ||
93 | # Is our configuration static? | |
94 | push @code, "static_config;\n" if $static; | |
95 | ||
96 | # Join into the complete code block | |
97 | return join( '', @code ); | |
98 | } | |
99 | ||
100 | 1; |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
6 | 6 | |
7 | 7 | use vars qw{$VERSION $ISCORE @ISA}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | $ISCORE = 1; |
11 | 11 | @ISA = qw{Module::Install::Base}; |
12 | 12 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.19'; | |
8 | $VERSION = '1.21'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
6 | 6 | |
7 | 7 | use vars qw{$VERSION @ISA $ISCORE}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | @ISA = 'Module::Install::Base'; |
11 | 11 | $ISCORE = 1; |
12 | 12 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
453 | 453 | my %license_urls = ( |
454 | 454 | perl => 'http://dev.perl.org/licenses/', |
455 | 455 | apache => 'http://apache.org/licenses/LICENSE-2.0', |
456 | apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1', | |
457 | 456 | artistic => 'http://opensource.org/licenses/artistic-license.php', |
458 | artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php', | |
459 | 457 | lgpl => 'http://opensource.org/licenses/lgpl-license.php', |
460 | lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php', | |
461 | lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html', | |
462 | 458 | bsd => 'http://opensource.org/licenses/bsd-license.php', |
463 | 459 | gpl => 'http://opensource.org/licenses/gpl-license.php', |
464 | 460 | gpl2 => 'http://opensource.org/licenses/gpl-2.0.php', |
469 | 465 | unrestricted => undef, |
470 | 466 | restrictive => undef, |
471 | 467 | unknown => undef, |
468 | ||
469 | # these are not actually allowed in meta-spec v1.4 but are left here for compatibility: | |
470 | apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1', | |
471 | artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php', | |
472 | lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php', | |
473 | lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html', | |
472 | 474 | ); |
473 | 475 | |
474 | 476 | sub license { |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
6 | 6 | |
7 | 7 | use vars qw{$VERSION @ISA $ISCORE}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | @ISA = 'Module::Install::Base'; |
11 | 11 | $ISCORE = 1; |
12 | 12 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = 'Module::Install::Base'; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
6 | 6 | |
7 | 7 | use vars qw{$VERSION @ISA $ISCORE}; |
8 | 8 | BEGIN { |
9 | $VERSION = '1.19'; | |
9 | $VERSION = '1.21'; | |
10 | 10 | @ISA = 'Module::Install::Base'; |
11 | 11 | $ISCORE = 1; |
12 | 12 | } |
4 | 4 | |
5 | 5 | use vars qw{$VERSION @ISA $ISCORE}; |
6 | 6 | BEGIN { |
7 | $VERSION = '1.19'; | |
7 | $VERSION = '1.21'; | |
8 | 8 | @ISA = qw{Module::Install::Base}; |
9 | 9 | $ISCORE = 1; |
10 | 10 | } |
29 | 29 | # This is not enforced yet, but will be some time in the next few |
30 | 30 | # releases once we can make sure it won't clash with custom |
31 | 31 | # Module::Install extensions. |
32 | $VERSION = '1.19'; | |
32 | $VERSION = '1.21'; | |
33 | 33 | |
34 | 34 | # Storage for the pseudo-singleton |
35 | 35 | $MAIN = undef; |
0 | package inc::Module::Install::DSL; | |
1 | ||
2 | # This module ONLY loads if the user has manually installed their own | |
3 | # installation of Module::Install, and are some form of MI author. | |
4 | # | |
5 | # It runs from the installed location, and is never bundled | |
6 | # along with the other bundled modules. | |
7 | # | |
8 | # So because the version of this differs from the version that will | |
9 | # be bundled almost every time, it doesn't have it's own version and | |
10 | # isn't part of the synchronisation-checking. | |
11 | ||
12 | use strict; | |
13 | use vars qw{$VERSION}; | |
14 | BEGIN { | |
15 | # While this version will be overwritten when Module::Install | |
16 | # loads, it remains so Module::Install itself can detect which | |
17 | # version an author currently has installed. | |
18 | # This allows it to implement any back-compatibility features | |
19 | # it may want or need to. | |
20 | $VERSION = '1.19'; | |
21 | } | |
22 | ||
23 | if ( -d './inc' ) { | |
24 | my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author'; | |
25 | if ( -d $author ) { | |
26 | $Module::Install::AUTHOR = 1; | |
27 | require File::Path; | |
28 | File::Path::rmtree('inc'); | |
29 | } | |
30 | } else { | |
31 | $Module::Install::AUTHOR = 1; | |
32 | } | |
33 | ||
34 | unshift @INC, 'inc' unless $INC[0] eq 'inc'; | |
35 | require inc::Module::Install; | |
36 | require Module::Install::DSL; | |
37 | ||
38 | # Tie our import to the main one | |
39 | sub import { | |
40 | goto &Module::Install::DSL::import; | |
41 | } | |
42 | ||
43 | 1; | |
44 | ||
45 | =pod | |
46 | ||
47 | =head1 NAME | |
48 | ||
49 | inc::Module::Install::DSL - Domain Specific Language for Module::Install | |
50 | ||
51 | =head1 SYNOPSIS | |
52 | ||
53 | use inc::Module::Install::DSL 0.80; | |
54 | ||
55 | all_from lib/ADAMK/Repository.pm | |
56 | requires File::Spec 3.29 | |
57 | requires File::pushd 1.00 | |
58 | requires File::Find::Rule 0.30 | |
59 | requires File::Find::Rule::VCS 1.05 | |
60 | requires File::Flat 0 | |
61 | requires File::Remove 1.42 | |
62 | requires IPC::Run3 0.034 | |
63 | requires Object::Tiny 1.06 | |
64 | requires Params::Util 0.35 | |
65 | requires CPAN::Version 5.5 | |
66 | test_requires Test::More 0.86 | |
67 | test_requires Test::Deep 1.03 | |
68 | install_script adamk | |
69 | ||
70 | requires_external_bin svn | |
71 | ||
72 | =head1 DESCRIPTION | |
73 | ||
74 | One of the primary design goals of L<Module::Install> is to simplify | |
75 | the creation of F<Makefile.PL> scripts. | |
76 | ||
77 | Part of this involves the gradual reduction of any and all superfluous | |
78 | characters, with the ultimate goal of requiring no non-critical | |
79 | information in the file. | |
80 | ||
81 | L<Module::Install::DSL> is a simple B<Domain Specific Language> based | |
82 | on the already-lightweight L<Module::Install> command syntax. | |
83 | ||
84 | The DSL takes one command on each line, and then wraps the command | |
85 | (and its parameters) with the normal quotes and semi-colons etc to | |
86 | turn it into Perl code. | |
87 | ||
88 | =head1 SUPPORT | |
89 | ||
90 | Bugs should be reported via the CPAN bug tracker at | |
91 | ||
92 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Module-Install> | |
93 | ||
94 | For other issues contact the author. | |
95 | ||
96 | =head1 AUTHORS | |
97 | ||
98 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | |
99 | ||
100 | =head1 COPYRIGHT | |
101 | ||
102 | Copyright 2008 - 2012 Adam Kennedy. | |
103 | ||
104 | This program is free software; you can redistribute it and/or | |
105 | modify it under the same terms as Perl itself. | |
106 | ||
107 | =cut |
17 | 17 | # version an author currently has installed. |
18 | 18 | # This allows it to implement any back-compatibility features |
19 | 19 | # it may want or need to. |
20 | $VERSION = '1.19'; | |
20 | $VERSION = '1.21'; | |
21 | 21 | } |
22 | 22 | |
23 | 23 | if ( -d './inc' ) { |
5 | 5 | $^W = 1; |
6 | 6 | } |
7 | 7 | |
8 | use Test::More tests => 68; | |
8 | use Test::More tests => 66; | |
9 | 9 | |
10 | 10 | # Check their perl version |
11 | 11 | ok( $] >= 5.005, "Your perl is new enough" ); |
22 | 22 | Module::Install::Can |
23 | 23 | Module::Install::Compiler |
24 | 24 | Module::Install::Deprecated |
25 | Module::Install::DSL | |
26 | 25 | Module::Install::External |
27 | 26 | Module::Install::Fetch |
28 | 27 | Module::Install::Include |
0 | # Tests for Module::Install::DSL | |
1 | ||
2 | use strict; | |
3 | BEGIN { | |
4 | $| = 1; | |
5 | $^W = 1; | |
6 | } | |
7 | ||
8 | use Test::More tests => 8; | |
9 | use lib 't/lib'; | |
10 | use MyTest; | |
11 | ||
12 | # Load the DSL module | |
13 | require_ok( 'inc::Module::Install::DSL' ); | |
14 | ||
15 | # Generate code from a simple dsl block | |
16 | my $code = Module::Install::DSL::dsl2code(<<'END_DSL'); | |
17 | all_from lib/My/Module.pm | |
18 | requires perl 5.008 | |
19 | requires Carp 0 | |
20 | requires Win32 if win32 | |
21 | test_requires Test::More | |
22 | install_share | |
23 | END_DSL | |
24 | ||
25 | is( $code, <<'END_PERL', 'dsl2code generates the expected code' ); | |
26 | all_from 'lib/My/Module.pm'; | |
27 | requires 'perl', '5.008'; | |
28 | requires 'Carp', '0'; | |
29 | requires 'Win32' if win32; | |
30 | test_requires 'Test::More'; | |
31 | install_share; | |
32 | END_PERL | |
33 | ||
34 | ||
35 | ||
36 | ||
37 | ||
38 | ###################################################################### | |
39 | # Automatic dynamic vs static detection | |
40 | ||
41 | # Automatically set static_config if there are no conditionals | |
42 | my $static = Module::Install::DSL::dsl2code(<<'END_DSL'); | |
43 | all_from lib/My/Module.pm | |
44 | requires perl 5.008 | |
45 | requires Carp 0 | |
46 | requires Win32 | |
47 | test_requires Test::More | |
48 | install_share | |
49 | END_DSL | |
50 | ||
51 | is( $static, <<'END_PERL', 'dsl2code generates the expected code' ); | |
52 | all_from 'lib/My/Module.pm'; | |
53 | requires 'perl', '5.008'; | |
54 | requires 'Carp', '0'; | |
55 | requires 'Win32'; | |
56 | test_requires 'Test::More'; | |
57 | install_share; | |
58 | static_config; | |
59 | END_PERL | |
60 | ||
61 | ||
62 | ||
63 | ||
64 | ||
65 | ##################################################################### | |
66 | # Full scan dist run | |
67 | ||
68 | ok( create_dist( 'Foo', { 'Makefile.PL' => <<"END_DSL" }), 'create_dist' ); | |
69 | use inc::Module::Install::DSL 0.81; | |
70 | name Foo | |
71 | version 0.01 | |
72 | license perl | |
73 | requires_from lib/Foo.pm | |
74 | requires File::Spec 0.79 | |
75 | END_DSL | |
76 | ok( build_dist(), 'build_dist' ); | |
77 | ok( -f makefile() ); | |
78 | ok( -f file('META.yml') ); | |
79 | ok( kill_dist(), 'kill_dist' ); |