lib/HTML/Object/DOM/NodeIterator.pm

filter: Statementstmt 90.9% 30 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 76.9% 10 / 13 Podpod 100% 4 / 4 totaltotal 88.0% 44 / 50 CC 1 SCAR 2.1
CC
1
Cov
91%
detach
2.0
pointerBeforeReferenceNode
2.0
pos
2.0
CRAP 1.2
« lib/HTML/Object/DOM/Element/HTML.pm ↑ Summary lib/HTML/Object/DOM/NodeList.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/NodeIterator.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/12/20
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::NodeIterator;
15 BEGIN
16 {
17 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶ warnings::register_categories( 'HTML::Object' );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶ use parent qw( HTML::Object::DOM::NodeIteratorShared );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 # To import its constants
23 2 ▶ use HTML::Object::DOM::Node;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶ use HTML::Object::DOM::NodeFilter qw( :all );
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 our $VERSION = 'v0.2.0';
26 };
27  
28 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 # Note: method init is inherited
32  
33 0 ▶sub detach { return; }
Subroutine detach: not called CC=1 SCAR=6.9
Pod documented
34  
35 # Note: property expandEntityReferences read-only is inherited
36  
37 # Note: property filter read-only inherited
38  
39 # Note: method nextNode is inherited
40  
41 # Note: property pointerBeforeReferenceNode read-only
42 0 ▶sub pointerBeforeReferenceNode : lvalue { return( shift->_set_get_boolean( 'pointerbeforereferencenode', @_ ) ); }
Subroutine pointerBeforeReferenceNode: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub pos { return( shift->{_relative_pos} ); }
Subroutine pos: not called CC=1 SCAR=6.9
Pod documented
45  
46 # Note: method previousNode is inherited
47  
48 # Note: property referenceNode read-only
49 sub referenceNode
50 {
51 7 ▶ my $self = shift( @_ );
Subroutine referenceNode: called CC=1 SCAR=0.0
Pod documented
52 7 my $elems = $self->_elements;
53 7 return( $elems->index( $self->{_pos} ) );
54 }
55  
56 # Note: property root read-only is inherited
57  
58 # Note: property whatToShow read-only is inherited
59  
60 2 1;
61 # NOTE: POD
62 __END__
« lib/HTML/Object/DOM/Element/HTML.pm ↑ Summary lib/HTML/Object/DOM/NodeList.pm »