line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::Passing::Role::Input; |
2
|
14
|
|
|
14
|
|
25857
|
use Moo::Role; |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
91
|
|
3
|
14
|
|
|
14
|
|
4660
|
use Scalar::Util qw/ blessed /; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
855
|
|
4
|
14
|
|
|
14
|
|
93
|
use Module::Runtime qw/ require_module /; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
111
|
|
5
|
14
|
|
|
14
|
|
943
|
use namespace::clean -except => 'meta'; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
123
|
|
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<Message::Passing::Role::Output> role. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 SEE ALSO |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=over |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item L<Message::Passing> |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item L<Message::Passing::Manual::Concepts> |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=back |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SPONSORSHIP |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This module exists due to the wonderful people at Suretec Systems Ltd. |
52
|
|
|
|
|
|
|
<http://www.suretecsystems.com/> who sponsored its development for its |
53
|
|
|
|
|
|
|
VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with |
54
|
|
|
|
|
|
|
the SureVoIP API - |
55
|
|
|
|
|
|
|
<http://www.surevoip.co.uk/support/wiki/api_documentation> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR, COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
See L<Message::Passing>. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |