line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::Passing::Role::Input; |
2
|
14
|
|
|
14
|
|
21452
|
use Moo::Role; |
|
14
|
|
|
|
|
25
|
|
|
14
|
|
|
|
|
83
|
|
3
|
14
|
|
|
14
|
|
4534
|
use Scalar::Util qw/ blessed /; |
|
14
|
|
|
|
|
61
|
|
|
14
|
|
|
|
|
1122
|
|
4
|
14
|
|
|
14
|
|
102
|
use Module::Runtime qw/ require_module /; |
|
14
|
|
|
|
|
25
|
|
|
14
|
|
|
|
|
109
|
|
5
|
14
|
|
|
14
|
|
761
|
use namespace::clean -except => 'meta'; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
110
|
|
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 |