OpenInteract2/Exception/Parameter.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 100% 28 / 28 CC 3 SCAR 6.9
CC
3
Cov
100%
full_message
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« OpenInteract2/Manage/Website/ViewSession.pm ↑ Summary OpenInteract2/SPOPS/DBI.pm »
1 package OpenInteract2::Exception::Parameter;
2  
3 # $Id: Parameter.pm,v 1.7 2005/03/17 14:58:02 sjn Exp $
4  
5 87 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 87 ▶use base qw( OpenInteract2::Exception Class::Accessor::Fast );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 87 $OpenInteract2::Exception::Parameter::VERSION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/);
9  
10 87 my @FIELDS = qw( parameter_fail );
11 87 OpenInteract2::Exception::Parameter->mk_accessors( @FIELDS );
12 4 ▶sub Fields { return @FIELDS }
Subroutine Fields: called CC=1 SCAR=0.0
Pod documented
13  
14 4 ▶sub full_message {
Subroutine full_message: called CC=3 SCAR=11.0
Pod documented
15 4 my ( $self ) = @_;
16 4 my $failures = $self->parameter_fail;
17 4 my @errors = ();
18 4 foreach my $field ( sort keys %{ $failures } ) {
19 my $field_msg = ( ref $failures->{ $field } eq 'ARRAY' )
20 1 ? join( '; ', @{ $failures->{ $field } } )
21 5 ▶ : $failures->{ $field };
Branch: 1 branch
BranchTrueFalseTotal
ref $failures->{$field} eq 'ARRAY' ? : 1 4 5
22 5 push @errors, "$field: $field_msg";
23 }
24 4 return "One or more parameters were not valid: " . join( ' ;; ', @errors );
25 }
26  
27 87 1;
28  
29 __END__
« OpenInteract2/Manage/Website/ViewSession.pm ↑ Summary OpenInteract2/SPOPS/DBI.pm »