line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::Passing::Role::Input; |
2
|
14
|
|
|
14
|
|
33323
|
use Moo::Role; |
|
14
|
|
|
|
|
100
|
|
|
14
|
|
|
|
|
94
|
|
3
|
14
|
|
|
14
|
|
6022
|
use Scalar::Util qw/ blessed /; |
|
14
|
|
|
|
|
52
|
|
|
14
|
|
|
|
|
1153
|
|
4
|
14
|
|
|
14
|
|
108
|
use Module::Runtime qw/ require_module /; |
|
14
|
|
|
|
|
48
|
|
|
14
|
|
|
|
|
93
|
|
5
|
14
|
|
|
14
|
|
867
|
use namespace::clean -except => 'meta'; |
|
14
|
|
|
|
|
51
|
|
|
14
|
|
|
|
|
135
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has output_to => ( |
8
|
|
|
|
|
|
|
is => 'ro', |
9
|
|
|
|
|
|
|
required => 1, |
10
|
|
|
|
|
|
|
isa => sub { blessed($_[0]) && $_[0]->can('consume') }, |
11
|
|
|
|
|
|
|
coerce => sub { |
12
|
|
|
|
|
|
|
my $val = shift; |
13
|
|
|
|
|
|
|
if (ref($val) eq 'HASH') { |
14
|
|
|
|
|
|
|
my %stuff = %$val; |
15
|
|
|
|
|
|
|
my $class = delete($stuff{class}); |
16
|
|
|
|
|
|
|
require_module($class); |
17
|
|
|
|
|
|
|
$val = $class->new(%stuff); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
$val; |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Message::Passing::Role::Input |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Produces messages. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 output_to |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Required, must perform the L role. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=over |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item L |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item L |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=back |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SPONSORSHIP |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module exists due to the wonderful people at Suretec Systems Ltd. |
52
|
|
|
|
|
|
|
who sponsored its development for its |
53
|
|
|
|
|
|
|
VoIP division called SureVoIP for use with |
54
|
|
|
|
|
|
|
the SureVoIP API - |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR, COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
See L. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |