| 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 | 9 | ▶ | { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 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' ); | |||||||||
| 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 | 0 | ▶ | { | ||||||||
|
Subroutine
init: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 30 | 0 | my $self = shift( @_ ); | |||||||||
| 31 | 0 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 32 | 0 | ▶ | $self->HTML::Object::Root::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 0 | return( $self ); | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | sub cmp | ||||||||||
| 37 | 0 | ▶ | { | ||||||||
|
Subroutine
cmp: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 38 | 0 | my( $self, $this ) = @_; | |||||||||
| 39 | 0 | ▶ | return( $self->_is_a( $this => 'HTML::Object::Root' ) ? 0 : 1 ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 0 | ▶ | sub getAttributes { return( wantarray() ? () : [] ); } | ||||||||
|
Subroutine
getAttributes: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||