blib/lib/Perl/Dist/WiX/BuildPerl/5123.pm untested

filter: Statementstmt 0.0% 0 / 48 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 57 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Perl::Dist::WiX::BuildPerl::5123;
2  
3 =pod
4  
5 =begin readme text
6  
7 Perl::Dist::WiX::BuildPerl::5123 version 1.500001
8  
9 =end readme
10  
11 =for readme stop
12  
13 =head1 NAME
14  
15 Perl::Dist::WiX::BuildPerl::5123 - Files and code for building Perl 5.12.3
16  
17 =head1 VERSION
18  
19 This document describes Perl::Dist::WiX::BuildPerl::5123 version 1.500001.
20  
21 =begin readme
22  
23 =head1 INSTALLATION
24  
25 To install this module, run the following commands:
26  
27 perl Build.PL
28 ./Build
29 ./Build test
30 ./Build install
31  
32 =end readme
33  
34 =for readme stop
35  
36 =head1 DESCRIPTION
37  
38 This module provides the routines and files that Perl::Dist::WiX uses in
39 order to build Perl 5.12.3 itself.
40  
41 =head1 SYNOPSIS
42  
43 # This module is not to be used independently.
44 # It provides methods to be called on a Perl::Dist::WiX object.
45 # See Perl::Dist::WiX::BuildPerl::PluginInterface for more information.
46  
47 =cut
48  
49 use 5.010;
50 use Moose::Role;
51 use File::ShareDir qw();
52 use Perl::Dist::WiX::Asset::Perl qw();
53  
54 our $VERSION = '1.500001';
55 $VERSION =~ s/_//sm;
56  
57  
58  
59 around '_install_perl_plugin' => sub {
60 shift;
61 my $self = shift;
62  
63 # Check for an error in the object.
64 if ( not $self->bin_make() ) {
65 PDWiX->throw('Cannot build Perl yet, no bin_make defined');
66 }
67  
68 # Get the information required for Perl's toolchain.
69 my $toolchain = $self->_create_perl_toolchain();
70  
71 # Install perl.
72 my $perl = Perl::Dist::WiX::Asset::Perl->new(
73 parent => $self,
74 url => 'http://strawberryperl.com/package/perl-5.12.3.tar.bz2',
75 toolchain => $toolchain,
76 patch => [ qw{
77 lib/CPAN/Config.pm
78 win32/config.gc
79 win32/config.gc64nox
80 win32/config_sh.PL
81 win32/config_H.gc
82 win32/config_H.gc64nox
83 }
84 ],
85 license => {
86 'perl-5.12.3/Readme' => 'perl/Readme',
87 'perl-5.12.3/Artistic' => 'perl/Artistic',
88 'perl-5.12.3/Copying' => 'perl/Copying',
89 },
90 );
91 $perl->install();
92  
93 return 1;
94 }; ## end sub install_perl_plugin
95  
96  
97  
98 around '_find_perl_file' => sub {
99 my $orig = shift;
100 my $self = shift;
101 my $file = shift;
102  
103 my $location = undef;
104  
105 $location = eval {
106 File::ShareDir::module_file( 'Perl::Dist::WiX::BuildPerl::5123',
107 "default/$file" );
108 };
109  
110 if ($location) {
111 return $location;
112 } else {
113 return $self->$orig($file);
114 }
115 };
116  
117 # Set the things that are defined by the perl version.
118  
119 has 'perl_version_literal' => (
120 is => 'ro',
121 init_arg => undef,
122 default => '5.012003',
123 );
124  
125 has 'perl_version_human' => (
126 is => 'ro',
127 writer => '_set_perl_version_human',
128 init_arg => undef,
129 default => '5.12.3',
130 );
131  
132 has '_perl_version_arrayref' => (
133 is => 'ro',
134 init_arg => undef,
135 default => sub { [ 5, 12, 3 ] },
136 );
137  
138 has '_perl_bincompat_version_arrayref' => (
139 is => 'ro',
140 init_arg => undef,
141 default => sub { [ 5, 12, 0 ] },
142 );
143  
144 has '_is_git_snapshot' => (
145 is => 'ro',
146 init_arg => undef,
147 default => q{},
148 );
149  
150 no Moose::Role;
151 1;
152  
153 __END__