line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Run::Plugin::AlternateInterpreters::Straps::AltIntrPlugin; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1021
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Test::Run::Plugin::AlternateInterpreters::Straps::AltIntrPlugin - a plugin |
9
|
|
|
|
|
|
|
for Test::Run::Straps to handle the alternative interpreters. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
This is a plugin for Test::Run::Straps to handle the alternative |
14
|
|
|
|
|
|
|
interpreters. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
7574
|
use MRO::Compat; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
9
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
extends('Test::Run::Base'); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has 'alternate_interpreters' => (is => "rw", isa => "ArrayRef"); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _get_command_and_switches |
28
|
|
|
|
|
|
|
{ |
29
|
6
|
|
|
6
|
|
45442
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
6
|
|
|
|
|
339
|
my $test_file = $self->file(); |
32
|
|
|
|
|
|
|
|
33
|
6
|
50
|
|
|
|
437
|
if (defined(my $interpreters_ref = $self->alternate_interpreters())) |
34
|
|
|
|
|
|
|
{ |
35
|
6
|
|
|
|
|
46
|
foreach my $i_ref (@$interpreters_ref) |
36
|
|
|
|
|
|
|
{ |
37
|
8
|
100
|
|
|
|
97
|
if ($self->_does_interpreter_match($i_ref, $test_file)) |
38
|
|
|
|
|
|
|
{ |
39
|
4
|
|
|
|
|
205
|
return [split(/\s+/, $i_ref->{'cmd'})]; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
2
|
|
|
|
|
63
|
return $self->next::method(); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _does_interpreter_match |
47
|
|
|
|
|
|
|
{ |
48
|
8
|
|
|
8
|
|
81
|
my ($self, $i_ref, $test_file) = @_; |
49
|
|
|
|
|
|
|
|
50
|
8
|
|
|
|
|
69
|
my $pattern = $i_ref->{pattern}; |
51
|
8
|
|
|
|
|
310
|
return ($test_file =~ m{$pattern}); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Shlomi Fish, C<< <shlomif at cpan.org> >> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 BUGS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
61
|
|
|
|
|
|
|
C<bug-test-run-plugin-alternateinterpreters at rt.cpan.org>, or through the web interface at |
62
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test::Run::Plugin::AlternateInterpreters>. |
63
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
64
|
|
|
|
|
|
|
your bug as I make changes. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SUPPORT |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
perldoc Test::Run::Plugin::AlternateInterpreters |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
You can also look for information at: |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item * CPAN Ratings |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Test::Run::Plugin::AlternateInterpreters> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::Plugin::AlternateInterpreters> |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * MetaCPAN |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L<https://metacpan.org/release/Test-Run-Plugin-AlternateInterpreters> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=back |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Curtis "Ovid" Poe ( L<https://metacpan.org/author/OVID> ) who gave the idea |
93
|
|
|
|
|
|
|
of testing several tests from several interpreters in one go here: |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L<http://use.perl.org/~Ovid/journal/32092> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SEE ALSO |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L<Test::Run>, L<Test::Run::CmdLine>, L<TAP::Parser> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Copyright 2007 Shlomi Fish, all rights reserved. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This program is released under the following license: MIT X11. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |
110
|
|
|
|
|
|
|
|