Workflow/Transition/Strict.pm

filter: Statementstmt 88.8% 8 / 9 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 84.6% 11 / 13 CC 2 SCAR 5.7
CC
2
Cov
82%
__ANON__
2.1
BEGIN
1.0
CRAP 1.8
« Workflow/Util/Delta.pm ↑ Summary Workflow/Transition/Validate.pm »
1 #!/usr/bin/perl
2  
3 package Class::Workflow::Transition::Strict;
4 5 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 11 ▶before apply => sub {
Subroutine __ANON__: called CC=2 SCAR=7.6
7 11 my ( $self, $instance, @args ) = @_;
8 11 my $state = $instance->state;
9  
10 11 ▶ unless ( $state->has_transition( $self ) ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($state->has_transition($self)) 0 11 11
11 0 die "$self is not in $instance\'s current state ($state)"
12 }
13 5 };
14  
15 5 __PACKAGE__;
16  
17 __END__
« Workflow/Util/Delta.pm ↑ Summary Workflow/Transition/Validate.pm »