| 1 | package TAP::Parser::SourceHandler::Perl; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 37 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 37 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 37 | ▶ | use Config; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 37 | ▶ | use constant IS_WIN32 => ( $^O =~ /^(MS)?Win32$/ ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 37 | ▶ | use constant IS_VMS => ( $^O eq 'VMS' ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 37 | ▶ | use TAP::Parser::IteratorFactory (); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 37 | ▶ | use TAP::Parser::Iterator::Process (); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 37 | ▶ | use Text::ParseWords qw(shellwords); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 37 | ▶ | use base 'TAP::Parser::SourceHandler::Executable'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 37 | TAP::Parser::IteratorFactory->register_handler(__PACKAGE__); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | TAP::Parser::SourceHandler::Perl - Stream TAP from a Perl executable | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | Version 3.52 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 37 | our $VERSION = '3.52'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | use TAP::Parser::Source; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | use TAP::Parser::SourceHandler::Perl; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | my $source = TAP::Parser::Source->new->raw( \'script.pl' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | $source->assemble_meta; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | my $class = 'TAP::Parser::SourceHandler::Perl'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | my $vote = $class->can_handle( $source ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | my $iter = $class->make_iterator( $source ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | This is a I<Perl> L<TAP::Parser::SourceHandler> - it has 2 jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 1. Figure out if the L<TAP::Parser::Source> it's given is actually a Perl | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | script (L</can_handle>). | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 2. Creates an iterator for Perl sources (L</make_iterator>). | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | Unless you're writing a plugin or subclassing L<TAP::Parser>, you probably | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | won't need to use this module directly. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | =head1 METHODS | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | =head2 Class Methods | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | =head3 C<can_handle> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | my $vote = $class->can_handle( $source ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | Only votes if $source looks like a file. Casts the following votes: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 0.9 if it has a shebang ala "#!...perl" | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 0.3 if it has any shebang | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 0.8 if it's a .t file | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 0.9 if it's a .pl file | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0.75 if it's in a 't' directory | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0.25 by default (backwards compat) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 313 | ▶ | sub can_handle { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
can_handle: called CC=9 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | ▶ | my ( $class, $source ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
can_handle: not called CC=9 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | my $meta = $source->meta; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 0 | ▶ | return 0 unless $meta->{is_file}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | my $file = $meta->{file}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | ▶ | my $shebang = $file->{shebang} || ''; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%2/4
$file->{'shebang'} || ''
$file->{'shebang'} || ''
MC/DC100%1/1
$file->{'shebang'} || ''
$file->{'shebang'}
MC/DC0%0/1
$file->{'shebang'} || ''
$file->{'shebang'}
Truth table100%2/2
A
A= $file->{'shebang'}
Truth table0%0/2
A
A= $file->{'shebang'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | ▶ | if ( $shebang =~ /^#!/ ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | ▶ | return 0.9 if $shebang =~ /^#!.*\bperl/; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | # We favour Perl as the interpreter for any shebang to preserve | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | # previous semantics: we used to execute everything via Perl and | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | # relied on it to pass the shebang off to the appropriate | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | # interpreter. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | return 0.3; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | ▶ | return 0.8 if $file->{lc_ext} eq '.t'; # vote higher than Executable | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | return 0.9 if $file->{lc_ext} eq '.pl'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | my @dirs = File::Spec->splitdir($file->{dir}); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | ▶ | return 0.75 if scalar(@dirs) && $dirs[0] eq 't'; # vote higher than Executable | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%2/6
scalar @dirs and $dirs[0] eq "t"
scalar @dirs and $dirs[0] eq "t"
MC/DC50%1/2
scalar @dirs and $dirs[0] eq "t"
scalar @dirs
$dirs[0] eq "t"
MC/DC0%0/2
scalar @dirs and $dirs[0] eq "t"
scalar @dirs
$dirs[0] eq "t"
Truth table66%2/3
A and B
A= scalar @dirsB= $dirs[0] eq "t"
Truth table0%0/3
A and B
A= scalar @dirsB= $dirs[0] eq "t"
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | # backwards compat, always vote: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | return 0.25; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | =head3 C<make_iterator> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | my $iterator = $class->make_iterator( $source ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | Constructs & returns a new L<TAP::Parser::Iterator::Process> for the source. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | Assumes C<$source-E<gt>raw> contains a reference to the perl script. C<croak>s | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | if the file could not be found. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | The command to run is built as follows: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | $perl @switches $perl_script @test_args | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | The perl command to use is determined by L</get_perl>. The command generated | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | is guaranteed to preserve: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | PERL5LIB | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | PERL5OPT | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | Taint Mode, if set in the script's shebang | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | I<Note:> the command generated will I<not> respect any shebang line defined in | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | your Perl script. This is only a problem if you have compiled a custom version | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | of Perl or if you want to use a specific version of Perl for one test and a | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | different version for another, for example: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | #!/path/to/a/custom_perl --some --args | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | #!/usr/local/perl-5.6/bin/perl -w | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | Currently you need to write a plugin to get around this. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 209 | ▶ | sub _autoflush_stdhandles { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_autoflush_stdhandles: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | my ($class) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_autoflush_stdhandles: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | $class->_autoflush( \*STDOUT ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $class->_autoflush( \*STDERR ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 209 | ▶ | sub make_iterator { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
make_iterator: called CC=2 SCAR=9.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | ▶ | my ( $class, $source ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
make_iterator: not called CC=2 SCAR=9.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | my $meta = $source->meta; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | my $perl_script = ${ $source->raw }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | ▶ | $class->_croak("Cannot find ($perl_script)") unless $meta->{is_file}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | # TODO: does this really need to be done here? | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | $class->_autoflush_stdhandles; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | my ( $libs, $switches ) | |||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | = $class->_mangle_switches( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | $class->_filter_libs( $class->_switches($source) ) ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | $class->_run( $source, $libs, $switches ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 360 | ▶ | sub _has_taint_switch { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_has_taint_switch: called CC=3 SCAR=14.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | ▶ | my( $class, $switches ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_has_taint_switch: not called CC=3 SCAR=14.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | my $has_taint = grep { $_ eq "-T" || $_ eq "-t" } @{$switches}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%3/6
$_ eq '-T' || $_ eq '-t'
$_ eq '-T' || $_ eq '-t'
MC/DC100%2/2
$_ eq '-T' || $_ eq '-t'
$_ eq '-T'
$_ eq '-t'
MC/DC0%0/2
$_ eq '-T' || $_ eq '-t'
$_ eq '-T'
$_ eq '-t'
Truth table100%3/3
A || B
A= $_ eq '-T'B= $_ eq '-t'
Truth table0%0/3
A || B
A= $_ eq '-T'B= $_ eq '-t'
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | return $has_taint ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 209 | ▶ | sub _mangle_switches { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_mangle_switches: called CC=4 SCAR=19.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | ▶ | my ( $class, $libs, $switches ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_mangle_switches: not called CC=4 SCAR=19.7
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | # Taint mode ignores environment variables so we must retranslate | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | # PERL5LIB as -I switches and place PERL5OPT on the command line | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | # in order that it be seen. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | if ( $class->_has_taint_switch($switches) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | ▶ | my @perl5lib = defined $ENV{PERL5LIB} ? split /$Config{path_sep}/, $ENV{PERL5LIB} : (); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | $libs, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | ▶ | [ @{$switches}, | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | $class->_libs2switches([@$libs, @perl5lib]), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | defined $ENV{PERL5OPT} ? shellwords( $ENV{PERL5OPT} ) : () | |||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | return ( $libs, $switches ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 209 | ▶ | sub _filter_libs { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_filter_libs: called CC=4 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | ▶ | my ( $class, @switches ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_filter_libs: not called CC=4 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | my $path_sep = $Config{path_sep}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | my $path_re = qr{$path_sep}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | # Filter out any -I switches to be handled as libs later. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | # Nasty kludge. It might be nicer if we got the libs separately | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | # although at least this way we find any -I switches that were | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | # supplied other then as explicit libs. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | # | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | # We filter out any names containing colons because they will break | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | # PERL5LIB | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | my @libs; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | my @filtered_switches; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | for (@switches) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | ▶ | if ( !/$path_re/ && m/ ^ ['"]? -I ['"]? (.*?) ['"]? $ /x ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition50%3/6
not /$path_re/ and / ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
not /$path_re/ and / ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
MC/DC100%2/2
not /$path_re/ and / ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
not /$path_re/
/ ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
MC/DC0%0/2
not /$path_re/ and / ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
not /$path_re/
/ ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
Truth table100%3/3
not(A) and B
A= not /$path_re/B= / ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
Truth table0%0/3
not(A) and B
A= not /$path_re/B= / ^ ['"]? -I ['"]? (.*?) ['"]? $ /x
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | push @libs, $1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | push @filtered_switches, $_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | return \@libs, \@filtered_switches; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 209 | ▶ | sub _iterator_hooks { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_iterator_hooks: called CC=1 SCAR=1.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 0 | ▶ | my ( $class, $source, $libs, $switches ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_iterator_hooks: not called CC=1 SCAR=1.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 209 | ▶ | my $setup = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=14.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | 0 | ▶ | if ( @{$libs} and !$class->_has_taint_switch($switches) ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=14.2
Branch: 2 branches
Condition50%3/6
@{$libs;} and not $class->_has_taint_switch($switches)
@{$libs;} and not $class->_has_taint_switch($switches)
MC/DC100%2/2
@{$libs;} and not $class->_has_taint_switch($switches)
@{$libs;}
not $class->_has_taint_switch($switches)
MC/DC0%0/2
@{$libs;} and not $class->_has_taint_switch($switches)
@{$libs;}
not $class->_has_taint_switch($switches)
Truth table100%3/3
A and not(B)
A= @{$libs;}B= not $class->_has_taint_switch($switches)
Truth table0%0/3
A and not(B)
A= @{$libs;}B= not $class->_has_taint_switch($switches)
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | $ENV{PERL5LIB} = join( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | $Config{path_sep}, grep {defined} @{$libs}, | |||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | $ENV{PERL5LIB} | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | # VMS environment variables aren't guaranteed to reset at the end of | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | # the process, so we need to put PERL5LIB back. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | my $previous = $ENV{PERL5LIB}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 205 | ▶ | my $teardown = sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=12.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | ▶ | if ( defined $previous ) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=12.2
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | 0 | $ENV{PERL5LIB} = $previous; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | delete $ENV{PERL5LIB}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 0 | return ( $setup, $teardown ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | 209 | ▶ | sub _run { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_run: called CC=2 SCAR=10.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | ▶ | my ( $class, $source, $libs, $switches ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_run: not called CC=2 SCAR=10.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | ▶ | my @command = $class->_get_command_for_switches( $source, $switches ) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | or $class->_croak("No command found!"); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | my ( $setup, $teardown ) = $class->_iterator_hooks( $source, $libs, $switches ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | return $class->_create_iterator( $source, \@command, $setup, $teardown ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 209 | ▶ | sub _create_iterator { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_create_iterator: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | ▶ | my ( $class, $source, $command, $setup, $teardown ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_create_iterator: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | return TAP::Parser::Iterator::Process->new( | |||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | { command => $command, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | merge => $source->merge, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | setup => $setup, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | teardown => $teardown, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | 209 | ▶ | sub _get_command_for_switches { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_command_for_switches: called CC=2 SCAR=9.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 0 | ▶ | my ( $class, $source, $switches ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_get_command_for_switches: not called CC=2 SCAR=9.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | my $file = ${ $source->raw }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | my @args = @{ $source->test_args || [] }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%2/4
$source->test_args || []
$source->test_args || []
MC/DC100%1/1
$source->test_args || []
$source->test_args
MC/DC0%0/1
$source->test_args || []
$source->test_args
Truth table100%2/2
A
A= $source->test_args
Truth table0%0/2
A
A= $source->test_args
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | my $command = $class->get_perl; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | # XXX don't need to quote if we treat the parts as atoms (except maybe vms) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | #$file = qq["$file"] if ( $file =~ /\s/ ) && ( $file !~ /^".*"$/ ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | my @command = ( $command, @{$switches}, $file, @args ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | return @command; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 15 | ▶ | sub _libs2switches { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_libs2switches: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | ▶ | my $class = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_libs2switches: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | 0 | return map {"-I$_"} grep {$_} @{ $_[0] }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | =head3 C<get_taint> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | Decode any taint switches from a Perl shebang line. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | # $taint will be 't' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | my $taint = TAP::Parser::SourceHandler::Perl->get_taint( '#!/usr/bin/perl -t' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | # $untaint will be undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | my $untaint = TAP::Parser::SourceHandler::Perl->get_taint( '#!/usr/bin/perl' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 209 | ▶ | sub get_taint { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_taint: called CC=3 SCAR=15.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 0 | ▶ | my ( $class, $shebang ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_taint: not called CC=3 SCAR=15.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | return | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | 0 | ▶ | unless defined $shebang | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%2/6
defined $shebang and $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
defined $shebang and $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
MC/DC50%1/2
defined $shebang and $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
defined $shebang
$shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
MC/DC0%0/2
defined $shebang and $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
defined $shebang
$shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
Truth table66%2/3
A and B
A= defined $shebangB= $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
Truth table0%0/3
A and B
A= defined $shebangB= $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | && $shebang =~ /^#!.*\bperl.*\s-\w*([Tt]+)/; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | return $1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 209 | ▶ | sub _switches { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_switches: called CC=4 SCAR=18.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | ▶ | my ( $class, $source ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_switches: not called CC=4 SCAR=18.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | my $file = ${ $source->raw }; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | ▶ | my @switches = @{ $source->switches || [] }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%2/4
$source->switches || []
$source->switches || []
MC/DC100%1/1
$source->switches || []
$source->switches
MC/DC0%0/1
$source->switches || []
$source->switches
Truth table100%2/2
A
A= $source->switches
Truth table0%0/2
A
A= $source->switches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | my $shebang = $source->meta->{file}->{shebang}; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | ▶ | return unless defined $shebang; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | my $taint = $class->get_taint($shebang); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | ▶ | push @switches, "-$taint" if defined $taint; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | # Quote the argument if we're VMS, since VMS will downcase anything | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | # not quoted. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | if (IS_VMS) { | |||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | for (@switches) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | $_ = qq["$_"]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | return @switches; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | =head3 C<get_perl> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | Gets the version of Perl currently running the test suite. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | 209 | ▶ | sub get_perl { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_perl: called CC=4 SCAR=22.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | 0 | ▶ | my $class = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_perl: not called CC=4 SCAR=22.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | ▶ | return $ENV{HARNESS_PERL} if defined $ENV{HARNESS_PERL}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | ▶ | return qq["$^X"] if IS_WIN32 && ( $^X =~ /[^\w\.\/\\]/ ); | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition16%1/6
&IS_WIN32() and $^X =~ m([^\w\./\\])
&IS_WIN32() and $^X =~ m([^\w\./\\])
MC/DC0%0/2
&IS_WIN32() and $^X =~ m([^\w\./\\])
&IS_WIN32()
$^X =~ m([^\w\./\\])
MC/DC0%0/2
&IS_WIN32() and $^X =~ m([^\w\./\\])
&IS_WIN32()
$^X =~ m([^\w\./\\])
Truth table33%1/3
A and B
A= &IS_WIN32()B= $^X =~ m([^\w\./\\])
Truth table0%0/3
A and B
A= &IS_WIN32()B= $^X =~ m([^\w\./\\])
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | return $^X; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | 37 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||