StateML/Action.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 32.1% 9 / 28 CC 4 SCAR 19.7
CC
4
Cov
33%
handlers
12.0
description
6.0
BEGIN
1.0
CRAP 7.1
« StateML/Arc.pm ↑ Summary StateML/Event.pm »
1 package StateML::Action;
2  
3 3 ▶use strict ;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use base qw(StateML::Object ) ;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 StateML::Action - A single action that can be used in multiple event handlers
9  
10 =head1 DESCRIPTION
11  
12 This is an optional part of StateML. It can be handy to package up an
13 action that occurs in several places in a state machine using <action>
14 elements and the corresponding action_id attributes.
15  
16 =cut
17  
18 0 ▶sub handlers {
Subroutine handlers: not called CC=3 SCAR=24.8
Pod undocumented
19 0 my $self = shift;
20 0 ▶ @{$self->{HANDLERS}} = @_ if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
21 0 ▶ return @{$self->{HANDLERS} || []};
Condition0%0/2
$self->{'HANDLERS'} || []
l!l
00
MC/DC0%0/1
$self->{'HANDLERS'} || []
$self->{'HANDLERS'}
Truth table0%0/2
A
A= $self->{'HANDLERS'}
Aresult
11
00
22 }
23  
24 0 ▶sub description {
Subroutine description: not called CC=2 SCAR=17.9
Pod undocumented
25 0 my $self = shift;
26 0 ▶ $self->{DESCRIPTION} = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 0 0 0
27 0 return $self->{DESCRIPTION};
28 }
29  
30 =head1 LIMITATIONS
31  
32 =head1 COPYRIGHT
33  
34 Copyright 2003, R. Barrie Slaymaker, Jr., All Rights Reserved
35  
36 =head1 LICENSE
37  
38 You may use this module under the terms of the BSD, Artistic, or GPL licenses,
39 any version.
40  
41 =head1 AUTHOR
42  
43 Barrie Slaymaker <barries@slaysys.com>
44  
45 =cut
46  
47 3 1 ;
« StateML/Arc.pm ↑ Summary StateML/Event.pm »