lib/HTML/Object/DOM/Root.pm

filter: Statementstmt 56.7% 21 / 37 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 36.8% 7 / 19 Podpod 100% 12 / 12 totaltotal 54.0% 40 / 74 CC 4 SCAR 10.2
CC
4
Cov
49%
init
6.0
cmp
6.0
getAttributes
6.0
CRAP 2.8
« blib/lib/HTML/Object/DOM/Root.pm ↑ Summary blib/lib/HTML/Object/DOM/Element/Button.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Root.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::Root;
15 BEGIN
16 {
17 9 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 9 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 9 ▶ warnings::register_categories( 'HTML::Object' );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 9 ▶ use parent qw( HTML::Object::Root HTML::Object::DOM::Node );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 9 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 9 our $VERSION = 'v0.2.0';
23 };
24  
25 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 sub init
29 {
30 0 ▶ my $self = shift( @_ );
Subroutine init: not called CC=2 SCAR=17.9
Pod documented
31 0 $self->{_init_strict_use_sub} = 1;
32 0 ▶ $self->HTML::Object::Root::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->HTML::Object::Root::init(@_) or return $self->pass_error 0 0 0
33 0 return( $self );
34 }
35  
36 sub cmp
37 {
38 0 ▶ my( $self, $this ) = @_;
Subroutine cmp: not called CC=2 SCAR=17.9
Pod documented
39 0 ▶ return( $self->_is_a( $this => 'HTML::Object::Root' ) ? 0 : 1 );
Branch: 1 branch
BranchTrueFalseTotal
$self->_is_a($this, 'HTML::Object::Root') ? : 0 0 0
40 }
41  
42 0 ▶sub getAttributes { return( wantarray() ? () : [] ); }
Subroutine getAttributes: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
43  
44 0 ▶sub getChildNodes { return( shift->root ); }
Subroutine getChildNodes: not called CC=1 SCAR=6.9
Pod documented
45  
46 0 ▶sub getName { return; }
Subroutine getName: not called CC=1 SCAR=6.9
Pod documented
47  
48 0 ▶sub getNextSibling { return; }
Subroutine getNextSibling: not called CC=1 SCAR=6.9
Pod documented
49  
50 0 ▶sub getParentNode { return; }
Subroutine getParentNode: not called CC=1 SCAR=6.9
Pod documented
51  
52 0 ▶sub getPreviousSibling { return; }
Subroutine getPreviousSibling: not called CC=1 SCAR=6.9
Pod documented
53  
54 0 ▶sub getRootNode { return( shift( @_ ) ); }
Subroutine getRootNode: not called CC=1 SCAR=6.9
Pod documented
55  
56 0 ▶sub is_inside { return( 0 ); }
Subroutine is_inside: not called CC=1 SCAR=6.9
Pod documented
57  
58 0 ▶sub isDocumentNode { return( 1 ); }
Subroutine isDocumentNode: not called CC=1 SCAR=6.9
Pod documented
59  
60 0 ▶sub root { return( shift->_set_get_object( 'root', 'HTML::Object::DOM::Node', @_ ) ); }
Subroutine root: not called CC=1 SCAR=6.9
Pod documented
61  
62 9 1;
63 # NOTE: POD
64 __END__
« blib/lib/HTML/Object/DOM/Root.pm ↑ Summary blib/lib/HTML/Object/DOM/Element/Button.pm »