line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Install::POE::Test::Loops; |
2
|
|
|
|
|
|
|
# vim: ts=3 sw=3 et |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1101
|
use 5.005; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
42
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
6
|
1
|
|
|
1
|
|
16
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
7
|
1
|
|
|
1
|
|
747
|
use Module::Install::Base; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
8
|
1
|
|
|
1
|
|
1154
|
use POE::Test::Loops; |
|
1
|
|
|
|
|
4295
|
|
|
1
|
|
|
|
|
29
|
|
9
|
1
|
|
|
1
|
|
8
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
10
|
1
|
|
|
1
|
|
6
|
use Carp (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Module::Install::POE::Test::Loops - Install tests for Ls |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
4
|
use vars qw{$VERSION @ISA}; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
296
|
|
19
|
|
|
|
|
|
|
$VERSION = '0.03'; |
20
|
|
|
|
|
|
|
@ISA = qw{Module::Install::Base}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 COMMANDS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
This plugin adds the following Module::Install commands: |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 gen_loop_tests |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
gen_loop_tests('t', qw(Glib)); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Generates tests under the directory F<./t> for the Glib loop. Also adds |
32
|
|
|
|
|
|
|
POE::Test::Loops to your configure_requires. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub gen_loop_tests { |
37
|
0
|
|
|
0
|
1
|
|
my ($self, $dir, @args) = @_; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
_gen_loop_tests($self, $dir, \@args); |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
if (defined $self->configure_requires) { |
42
|
0
|
|
|
|
|
|
my %c_r = @{$self->configure_requires}; |
|
0
|
|
|
|
|
|
|
43
|
0
|
0
|
|
|
|
|
return if (defined $c_r{'POE::Test::Loops'}); |
44
|
|
|
|
|
|
|
} |
45
|
0
|
|
|
|
|
|
$self->configure_requires('POE::Test::Loops', '1.002') |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _gen_loop_tests { |
49
|
0
|
|
|
0
|
|
|
my ($self, $dir, $loops) = @_; |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t'; |
52
|
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
Carp::confess "no dirs given to gen_loop_tests" |
54
|
|
|
|
|
|
|
unless @$loops; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
POE::Test::Loops::generate($dir, $loops); |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
$self->tests( |
59
|
|
|
|
|
|
|
join ' ', @tests, |
60
|
|
|
|
|
|
|
map { |
61
|
0
|
|
|
|
|
|
File::Spec->catfile("$dir/", lc($_), "*.t"); |
62
|
|
|
|
|
|
|
} sort @$loops |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 BUGS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Please report any bugs or feature requests through the web interface at |
71
|
|
|
|
|
|
|
L. I will be notified, and then you'll automatically be |
72
|
|
|
|
|
|
|
notified of progress on your bug as I make changes. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 AUTHOR |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Martijn van Beers |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 LICENSE gpl |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This software is Copyright (c) 2008 by Martijn van Beers. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This is free software, licensed under the GNU General |
83
|
|
|
|
|
|
|
Public License, Version 2 or higher. See the LICENSE file for details. |