Object/DOM/Element/Object.pm

filter: Statementstmt 48.9% 24 / 49 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 34.7% 8 / 23 Podpod 100% 15 / 15 totaltotal 47.0% 47 / 100 CC 6 SCAR 16.8
CC
6
Cov
40%
form
20.0
init
12.0
archive
2.0
CRAP 5.4
« Object/XPath/LocationPath.pm ↑ Summary Object/DOM/XPathResult.pm »
1 ##----------------------------------------------------------------------------
2 ## HTML Object - ~/lib/HTML/Object/DOM/Element/Object.pm
3 ## Version v0.2.0
4 ## Copyright(c) 2021 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/12/23
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::Element::Object;
15 BEGIN
16 1 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 warnings::register_categories( 'HTML::Object' );
20 1 ▶ use parent qw( HTML::Object::DOM::Element );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶ use HTML::Object::DOM::Element::Shared qw( :object );
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 our $VERSION = 'v0.2.0';
24 };
25  
26 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 sub init
30 0 ▶{
Subroutine init: not called CC=3 SCAR=24.8
Pod documented
31 0 my $self = shift( @_ );
32 0 $self->{_init_strict_use_sub} = 1;
33 0 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 0 0 0
34 0 ▶ $self->{tag} = 'object' if( !CORE::length( "$self->{tag}" ) );
Branch: 1 branch
BranchTrueFalseTotal
unless length qq[$self->{"tag"}] 0 0 0
35 0 return( $self );
36 }
37  
38 # Note: property align inherited
39  
40 # Note: property archive
41 0 ▶sub archive : lvalue { return( shift->_set_get_property( 'archive', @_ ) ); }
Subroutine archive: not called CC=1 SCAR=6.9
Pod documented
42  
43 # Note: property border
44 0 ▶sub border : lvalue { return( shift->_set_get_property( 'border', @_ ) ); }
Subroutine border: not called CC=1 SCAR=6.9
Pod documented
45  
46 # Note: object method checkValidity inherited
47  
48 # Note: property code
49 0 ▶sub code : lvalue { return( shift->_set_get_property( 'code', @_ ) ); }
Subroutine code: not called CC=1 SCAR=6.9
Pod documented
50  
51 # Note: property codeBase
52 0 ▶sub codeBase : lvalue { return( shift->_set_get_property( 'codebase', @_ ) ); }
Subroutine codeBase: not called CC=1 SCAR=6.9
Pod documented
53  
54 # Note: property codeType
55 0 ▶sub codeType : lvalue { return( shift->_set_get_property( 'codetype', @_ ) ); }
Subroutine codeType: not called CC=1 SCAR=6.9
Pod documented
56  
57 # Note: property contentDocument read-only
58 0 ▶sub contentDocument : lvalue { return( shift->_set_get_object_lvalue( 'contentdocument', 'HTML::Object::DOM::Document', @_ ) ); }
Subroutine contentDocument: not called CC=1 SCAR=6.9
Pod documented
59  
60 # Note: property contentWindow read-only
61 0 ▶sub contentWindow : lvalue { return( shift->_set_get_object_lvalue( 'contentwindow', 'HTML::Object::DOM::WindowProxy', @_ ) ); }
Subroutine contentWindow: not called CC=1 SCAR=6.9
Pod documented
62  
63 # Note: property data
64 0 ▶sub data : lvalue { return( shift->_set_get_property( { attribute => 'data', is_uri => 1 }, @_ ) ); }
Subroutine data: not called CC=1 SCAR=6.9
Pod documented
65  
66 # Note: property declare
67 0 ▶sub declare : lvalue { return( shift->_set_get_property( { attribute => 'declare', is_boolean => 1 }, @_ ) ); }
Subroutine declare: not called CC=1 SCAR=6.9
Pod documented
68  
69 # Note: property form read-only
70 sub form
71 0 ▶{
Subroutine form: not called CC=4 SCAR=30.0
Pod documented
72 0 my $self = shift( @_ );
73 0 my $id = $self->attr( 'form' );
74 0 ▶ return if( !defined( $id ) || !CORE::length( "$id" ) );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $id and length "$id" 0 0 0
Condition0%0/3
defined $id and length "$id"
!ll&&!rl&&r
000
MC/DC0%0/2
defined $id and length "$id"
defined $id length "$id"
Truth table0%0/3
A and B
A= defined $idB= length "$id"
ABresult
0X0
100
111
75 0 my $root = $self->root;
76 0 ▶ return if( !$root );
Branch: 1 branch
BranchTrueFalseTotal
unless $root 0 0 0
77 0 my $form = $root->getElementById( $id );
78 0 return( $form );
79 }
80  
81 # Note: property height inherited
82  
83 # Note: property hspace
84 0 ▶sub hspace : lvalue { return( shift->_set_get_property( 'hspace', @_ ) ); }
Subroutine hspace: not called CC=1 SCAR=6.9
Pod documented
85  
86 # Note: property name inherited
87  
88 # Note: method setCustomValidity inherited
89  
90 # Note: property standby
91 0 ▶sub standby : lvalue { return( shift->_set_get_property( 'standby', @_ ) ); }
Subroutine standby: not called CC=1 SCAR=6.9
Pod documented
92  
93 # Note: property type inherited
94  
95 # Note: property typemustmatch
96 0 ▶sub typemustmatch : lvalue { return( shift->_set_get_property( { attribute => 'type', is_boolean => 1 }, @_ ) ); }
Subroutine typemustmatch: not called CC=1 SCAR=6.9
Pod documented
97  
98 # Note: property useMap inherited
99  
100 # Note: property validationMessage read-only inherited
101  
102 # Note: property validity read-only inherited
103  
104 # Note: property vspace
105 0 ▶sub vspace : lvalue { return( shift->_set_get_property( 'vspace', @_ ) ); }
Subroutine vspace: not called CC=1 SCAR=6.9
Pod documented
106  
107 # Note: property width inherited
108  
109 # Note: property willValidate read-only inherited
110  
111 1 1;
112 # NOTE: POD
113 __END__
« Object/XPath/LocationPath.pm ↑ Summary Object/DOM/XPathResult.pm »