Object/DOM/Boolean.pm

filter: Statementstmt 70.0% 21 / 30 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 100% 3 / 3 totaltotal 60.7% 31 / 51 CC 5 SCAR 15.7
CC
5
Cov
55%
init
12.0
toString
6.0
valueOf
6.0
CRAP 4.8
« Object/DOM/Closing.pm ↑ Summary Object/DOM/Element/Title.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Boolean.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/12/13
7 ## Modified 2022/09/18
8 ## All rights reserved.
9 ##
10 ##
11 ## This program is free software; you can redistribute it and/or modify it
12 ## under the same terms as Perl itself.
13 ##----------------------------------------------------------------------------
14 package HTML::Object::DOM::Boolean;
15 BEGIN
16 8 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
17 8 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 8 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 8 warnings::register_categories( 'HTML::Object' );
20 8 ▶ use parent qw( Module::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 8 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 8 our $VERSION = 'v0.2.0';
23 };
24  
25 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 sub init
29 0 ▶{
Subroutine init: not called CC=3 SCAR=24.8
Pod documented
30 0 my $self = shift( @_ );
31 0 my $bool = shift( @_ );
32 0 $self->{value} = $bool;
33 0 $self->{_init_strict_use_sub} = 1;
34 0 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 0 0
35 0 ▶ $self->{value} = $self->{value} ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$self->{'value'} ? : 0 0 0
36 0 return( $self );
37 }
38  
39 0 ▶sub toString { return( shift->{value} ? 'true' : 'false' ); }
Subroutine toString: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
+(shift())->{'value'} ? : 0 0 0
40  
41 0 ▶sub valueOf { return( shift->{value} ? 1 : 0 ); }
Subroutine valueOf: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
+(shift())->{'value'} ? : 0 0 0
42  
43 8 1;
44 # NOTE: POD
45 __END__
« Object/DOM/Closing.pm ↑ Summary Object/DOM/Element/Title.pm »