| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/Image.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::Image; | ||||||||||
| 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( :img ); | ||||||||
|
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->{complete} = 1; | |||||||||
| 33 | 0 | $self->{decoding} = 'auto'; | |||||||||
| 34 | 0 | $self->{naturalheight} = 0; | |||||||||
| 35 | 0 | $self->{naturalwidth} = 0; | |||||||||
| 36 | 0 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 37 | 0 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | 0 | ▶ | $self->{tag} = 'image' if( !CORE::length( "$self->{tag}" ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | 0 | return( $self ); | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | # Note: property alt inherited | ||||||||||
| 43 | |||||||||||
| 44 | # Note: property read-only | ||||||||||
| 45 | 0 | ▶ | sub complete : lvalue { return( shift->_set_get_boolean( 'complete', @_ ) ); } | ||||||||
|
Subroutine
complete: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 46 | |||||||||||
| 47 | # Note: property crossOrigin inherited | ||||||||||
| 48 | |||||||||||
| 49 | # Note: property read-only currentSrc inherited | ||||||||||
| 50 | |||||||||||
| 51 | 0 | ▶ | sub decode { return; } | ||||||||
|
Subroutine
decode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 52 | |||||||||||
| 53 | # Note: property | ||||||||||
| 54 | 0 | ▶ | sub decoding : lvalue { return( shift->_set_get_scalar_as_object( 'decoding', @_ ) ); } | ||||||||
|
Subroutine
decoding: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 55 | |||||||||||
| 56 | # Note: property height inherited | ||||||||||
| 57 | |||||||||||
| 58 | # Note: property | ||||||||||
| 59 | 0 | ▶ | sub isMap : lvalue { return( shift->_set_get_property( { attribute => 'ismap', is_boolean => 1 }, @_ ) ); } | ||||||||
|
Subroutine
isMap: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 60 | |||||||||||
| 61 | # Note: property | ||||||||||
| 62 | 0 | ▶ | sub loading : lvalue { return( shift->_set_get_property( 'loading', @_ ) ); } | ||||||||
|
Subroutine
loading: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 63 | |||||||||||
| 64 | # Note: property read-only | ||||||||||
| 65 | 0 | ▶ | sub naturalHeight : lvalue { return( shift->_set_get_number( 'naturalheight', @_ ) ); } | ||||||||
|
Subroutine
naturalHeight: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 66 | |||||||||||
| 67 | # Note: property read-only | ||||||||||
| 68 | 0 | ▶ | sub naturalWidth : lvalue { return( shift->_set_get_number( 'naturalwidth', @_ ) ); } | ||||||||
|
Subroutine
naturalWidth: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 69 | |||||||||||
| 70 | # Note: property referrerPolicy inherited | ||||||||||
| 71 | |||||||||||
| 72 | # Note: property | ||||||||||
| 73 | 0 | ▶ | sub sizes : lvalue { return( shift->_set_get_property( 'sizes', @_ ) ); } | ||||||||
|
Subroutine
sizes: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 74 | |||||||||||
| 75 | # Note: property src inherited | ||||||||||
| 76 | |||||||||||
| 77 | # Note: property | ||||||||||
| 78 | 0 | ▶ | sub srcset : lvalue { return( shift->_set_get_property( 'srcset', @_ ) ); } | ||||||||
|
Subroutine
srcset: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 79 | |||||||||||
| 80 | # Note: property useMap inherited | ||||||||||
| 81 | |||||||||||
| 82 | # Note: property width inherited | ||||||||||
| 83 | |||||||||||
| 84 | # Note: property read-only | ||||||||||
| 85 | 0 | ▶ | sub x : lvalue { return( shift->_set_get_number( 'x', @_ ) ); } | ||||||||
|
Subroutine
x: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 86 | |||||||||||
| 87 | # Note: property read-only | ||||||||||
| 88 | 0 | ▶ | sub y : lvalue { return( shift->_set_get_number( 'y', @_ ) ); } # :: | ||||||||
|
Subroutine
y: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 89 | |||||||||||
| 90 | 1 | 1; | |||||||||
| 91 | # NOTE: POD | ||||||||||
| 92 | __END__ | ||||||||||