line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Class::TLB::Dummy ; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3606
|
use strict ; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings ; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
224
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Class::TLB::Dummy - A dummy resource for test purpose. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head2 new |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Returns a new instance of this. |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new{ |
19
|
3
|
|
|
3
|
1
|
11
|
my ( $class , $id ) = @_ ; |
20
|
3
|
|
|
|
|
8
|
my $self = {'id' => $id } ; |
21
|
3
|
|
|
|
|
16
|
return bless $self , $class ; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 doSomething |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Do something and return a string for display. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub doSomething{ |
31
|
3
|
|
|
3
|
1
|
6
|
my ( $self ) = @_ ; |
32
|
3
|
|
|
|
|
13
|
return "I (".$self->{'id'}.") did something"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 oneFail |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Fails only if id is 1 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub oneFail{ |
43
|
1001
|
|
|
1001
|
1
|
1287
|
my ( $self ) = @_ ; |
44
|
1001
|
100
|
|
|
|
2436
|
if ( $self->{'id'} == 1 ){ |
45
|
1
|
|
|
|
|
8
|
die "I am 1 and I fail" ; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
#select(undef,undef,undef, 0.01); |
48
|
1000
|
|
|
|
|
3390
|
return "I am ".$self->{'id'} ; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 doFail |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This fails each time |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub doFail{ |
58
|
3
|
|
|
3
|
1
|
6
|
my ( $self ) = @_ ; |
59
|
3
|
|
|
|
|
19
|
die "Arghhh" ; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |