Perl/Dist/Strawberry/BuildPerl/5140.pm untested

filter: Statementstmt 0.0% 0 / 39 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 48 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::Strawberry::BuildPerl::5140;
2  
3 =pod
4  
5 =begin readme text
6  
7 Perl::Dist::Strawberry::BuildPerl::5140 version 2.50
8  
9 =end readme
10  
11 =for readme stop
12  
13 =head1 NAME
14  
15 Perl::Dist::Strawberry::BuildPerl::5140 - Files and code for building Perl 5.14.0
16  
17 =head1 VERSION
18  
19 This document describes Perl::Dist::Strawberry::BuildPerl::5140 version 2.50.
20  
21 =head1 DESCRIPTION
22  
23 This module provides the routines and files that Perl::Dist::Strawberry uses in
24 order to build Perl itself.
25  
26 =begin readme
27  
28 =head1 INSTALLATION
29  
30 To install this module, run the following commands:
31  
32 perl Build.PL
33 ./Build
34 ./Build test
35 ./Build install
36  
37 =end readme
38  
39 =for readme stop
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::Strawberry object.
45  
46 =head1 INTERFACE
47  
48 =cut
49  
50 use 5.010;
51 use Moose::Role;
52 use File::ShareDir qw();
53 use Perl::Dist::WiX::Asset::Perl qw();
54  
55 our $VERSION = '2.50';
56 $VERSION =~ s/_//sm;
57  
58  
59  
60  
61 #####################################################################
62 # Perl installation support
63  
64 =head2 install_perl_plugin
65  
66 This routine is called by the
67 C<install_perl|Perl::Dist::WiX::BuildPerl/install_perl> task, and installs
68 perl 5.14.0.
69  
70 =cut
71  
72  
73  
74 around '_install_perl_plugin' => sub {
75 shift; # We don't need the original.
76 my $self = shift;
77  
78 # Check for an error in the object.
79 if ( not $self->bin_make() ) {
80 PDWiX->throw('Cannot build Perl yet, no bin_make defined');
81 }
82  
83 # Get the information required for Perl's toolchain.
84 my $toolchain = $self->_create_perl_toolchain();
85  
86 # Install perl.
87 my $perl = Perl::Dist::WiX::Asset::Perl->new(
88 parent => $self,
89 url => 'http://strawberryperl.com/package/perl-5.14.0.tar.bz2',
90 toolchain => $toolchain,
91 patch => [ qw{
92 lib/CPAN/Config.pm
93 win32/config.gc
94 win32/config.gc64nox
95 win32/config_sh.PL
96 win32/config_H.gc
97 win32/config_H.gc64nox
98 win32/FindExt.pm
99 }
100 ],
101 license => {
102 'perl-5.14.0/Readme' => 'perl/Readme',
103 'perl-5.14.0/Artistic' => 'perl/Artistic',
104 'perl-5.14.0/Copying' => 'perl/Copying',
105 },
106 );
107 $perl->install();
108  
109 return 1;
110 }; ## end sub install_perl_plugin
111  
112  
113  
114 around '_find_perl_file' => sub {
115 my $orig = shift;
116 my $self = shift;
117 my $file = shift;
118  
119 my $location = undef;
120  
121 $location = eval {
122 File::ShareDir::module_file(
123 'Perl::Dist::Strawberry::BuildPerl::5140', $file );
124 };
125  
126 if ($location) {
127 return $location;
128 } else {
129 return $self->$orig($file);
130 }
131 };
132  
133 no Moose::Role;
134  
135 1;
136  
137 __END__