Object/Closing.pm

filter: Statementstmt 96.9% 32 / 33 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 91.6% 11 / 12 Podpod 100% 5 / 5 totaltotal 94.4% 51 / 54 CC 3 SCAR 3.1
CC
3
Cov
95%
init
2.0
as_string
2.0
as_xml
2.0
CRAP 1.4
« Object/Space.pm ↑ Summary Object/DOM/Element/HTML.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/Closing.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/04/19
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::Closing;
15 BEGIN
16 36 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
17 36 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 36 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 36 warnings::register_categories( 'HTML::Object' );
20 36 ▶ use parent qw( HTML::Object::Element );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 36 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 36 our $VERSION = 'v0.2.0';
23 };
24  
25 36 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 36 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 sub init
29 365 ▶{
Subroutine init: called CC=2 SCAR=7.0
Pod documented
30 365 my $self = shift( @_ );
31 365 $self->{is_empty} = 1;
32 365 $self->{tag} = '_closing';
33 365 $self->{_init_strict_use_sub} = 1;
34 365 $self->{_exception_class} = 'HTML::Object::Exception';
35 365 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 365 0 365
36 365 return( $self );
37 }
38  
39 sub as_string
40 124 ▶{
Subroutine as_string: called CC=2 SCAR=6.9
Pod documented
41 124 my $self = shift( @_ );
42 124 my $tag = $self->tag;
43 124 ▶ return( $self->original->length ? $self->original : $self->new_scalar( "</${tag}>" ) );
Branch: 1 branch
BranchTrueFalseTotal
$self->original->length ? : 96 28 124
44 }
45  
46 0 ▶sub as_xml { return( shift->as_string( @_ ) ); }
Subroutine as_xml: not called CC=1 SCAR=6.9
Pod documented
47  
48 365 ▶sub checksum { return( '' ); }
Subroutine checksum: called CC=1 SCAR=0.0
Pod documented
49  
50 365 ▶sub set_checksum {}
Subroutine set_checksum: called CC=1 SCAR=0.0
Pod documented
51  
52 36 1;
53 # NOTE: POD
54 __END__
« Object/Space.pm ↑ Summary Object/DOM/Element/HTML.pm »