line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::Passing::Output::Test; |
2
|
13
|
|
|
13
|
|
125814
|
use Moo; |
|
13
|
|
|
|
|
73260
|
|
|
13
|
|
|
|
|
88
|
|
3
|
13
|
|
|
13
|
|
18942
|
use MooX::Types::MooseLike::Base qw/ ArrayRef /; |
|
13
|
|
|
|
|
52820
|
|
|
13
|
|
|
|
|
1144
|
|
4
|
13
|
|
|
13
|
|
4149
|
use namespace::clean -except => 'meta'; |
|
13
|
|
|
|
|
68131
|
|
|
13
|
|
|
|
|
151
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
extends 'Message::Passing::Output::Callback'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has '+cb' => ( |
9
|
|
|
|
|
|
|
default => sub { sub {} }, |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has _messages => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => ArrayRef, |
15
|
|
|
|
|
|
|
default => sub { [] }, |
16
|
|
|
|
|
|
|
clearer => 'clear_messages', |
17
|
|
|
|
|
|
|
lazy => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
27
|
|
|
27
|
1
|
114321
|
sub messages { @{ $_[0]->_messages } } |
|
27
|
|
|
|
|
686
|
|
21
|
27
|
|
|
27
|
1
|
43
|
sub consume_test { push(@{$_[0]->_messages }, $_[1]) } |
|
27
|
|
|
|
|
509
|
|
22
|
14
|
|
|
14
|
1
|
16983
|
sub message_count { scalar @{ $_[0]->_messages } } |
|
14
|
|
|
|
|
351
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
after consume => sub { |
26
|
|
|
|
|
|
|
shift()->consume_test(@_); |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Message::Passing::Output::Test - Output for use in unit tests |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
You only want this if you're writing tests... |
39
|
|
|
|
|
|
|
See the current tests for examples.. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 METHODS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 messages |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 consume_test |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 message_count |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SEE ALSO |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
L |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SPONSORSHIP |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
This module exists due to the wonderful people at Suretec Systems Ltd. |
56
|
|
|
|
|
|
|
who sponsored its development for its |
57
|
|
|
|
|
|
|
VoIP division called SureVoIP for use with |
58
|
|
|
|
|
|
|
the SureVoIP API - |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 AUTHOR, COPYRIGHT AND LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
See L. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |