line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Run::CmdLine::Trap::Prove; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
29668
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use vars (qw($VERSION)); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$VERSION = '0.0131'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
960
|
use Moose; |
|
1
|
|
|
|
|
476211
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends('Test::Run::Trap::Obj'); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
8158
|
use Test::Trap qw( trap $trap :flow:stderr(systemsafe):stdout(systemsafe):warn ); |
|
1
|
|
|
|
|
48349
|
|
|
1
|
|
|
|
|
6
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'system_ret' => (is => "rw", isa => "Num"); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub trap_run |
19
|
|
|
|
|
|
|
{ |
20
|
36
|
|
|
36
|
1
|
220390
|
my ($class, $args) = @_; |
21
|
|
|
|
|
|
|
|
22
|
36
|
|
|
|
|
104
|
my $cmdline = $args->{cmdline}; |
23
|
36
|
|
|
|
|
84
|
my $runprove = $args->{runprove}; |
24
|
36
|
|
|
|
|
51
|
my $system_ret; |
25
|
|
|
|
|
|
|
|
26
|
36
|
|
|
36
|
|
279
|
trap { $system_ret = system("$runprove $cmdline"); }; |
|
36
|
|
|
|
|
42966191
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return $class->new({ |
29
|
36
|
|
|
|
|
3134104
|
( map { $_ => $trap->$_() } |
|
288
|
|
|
|
|
2562
|
|
30
|
|
|
|
|
|
|
(qw(stdout stderr die leaveby exit return warn wantarray))), |
31
|
|
|
|
|
|
|
system_ret => $system_ret, |
32
|
|
|
|
|
|
|
}); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Test::Run::CmdLine::Trap::Prove - trap the output of a runprove run. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Testing class to trap the output of a runprove run. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 METHODS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 Test::Run::CmdLine::Trap::Prove->trap_run({runprove => $path_to_exe, cmdline => $cmdline}) |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Traps the output of the runprove $path_to_exe with the command line args |
50
|
|
|
|
|
|
|
of $cmdline. Returns the object to be used as a constructor. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 AUTHORS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Shlomi Fish, L<http://www.shlomifish.org/> . |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 BUGS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
59
|
|
|
|
|
|
|
C<bug-test-run-cmdline@rt.cpan.org>, or through the web interface at |
60
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine>. |
61
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
62
|
|
|
|
|
|
|
your bug as I make changes. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SUPPORT |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
perldoc Test::Run::CmdLine |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
You can also look for information at: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=over 4 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Test::Run::CmdLine> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * CPAN Ratings |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Test::Run::CmdLine> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * Search CPAN |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Test::Run::CmdLine/> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The latest source of Test::Run::CmdLine is available from the Test::Run |
95
|
|
|
|
|
|
|
BerliOS Subversion repository: |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L<https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 SEE ALSO |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L<Test::Trap>, L<Test::Run::Trap::Obj> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Copyright 2005 Shlomi Fish, all rights reserved. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This program is released under the MIT X11 License. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |