Wire/Event/ConfigService.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 13 / 13 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Wire/Event/BuildService.pm ↑ Summary
1 package Beam::Wire::Event::ConfigService;
2 30 our $VERSION = '1.031';
3 # ABSTRACT: Event fired when configuring a new service
4  
5 #pod =head1 SYNOPSIS
6 #pod
7 #pod my $wire = Beam::Wire->new( ... );
8 #pod $wire->on( configure_service => sub {
9 #pod my ( $event ) = @_;
10 #pod print "Configuring service named " . $event->service_name;
11 #pod } );
12 #pod
13 #pod =head1 DESCRIPTION
14 #pod
15 #pod This event is fired when a service is configured. See
16 #pod L<Beam::Wire/configure_service>.
17 #pod
18 #pod =head1 ATTRIBUTES
19 #pod
20 #pod This class inherits from L<Beam::Event> and adds the following attributes.
21 #pod
22 #pod =cut
23  
24 30 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 30 ▶use Types::Standard qw( HashRef Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
26 30 extends 'Beam::Event';
27  
28 #pod =attr emitter
29 #pod
30 #pod The container that is listening for the event.
31 #pod
32 #pod =attr service_name
33 #pod
34 #pod The name of the service being configured.
35 #pod
36 #pod =cut
37  
38 30 has service_name => (
39 is => 'ro',
40 isa => Str,
41 );
42  
43 #pod =attr config
44 #pod
45 #pod The normalized configuration for the service (see L<Beam::Wire/normalize_config>).
46 #pod
47 #pod =cut
48  
49 30 has config => (
50 is => 'ro',
51 isa => HashRef,
52 );
53  
54 30 1;
55  
56 __END__
« Wire/Event/BuildService.pm ↑ Summary