| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Boolean.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::Boolean; | ||||||||||
| 15 | BEGIN | ||||||||||
| 16 | 8 | ▶ | { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 8 | warnings::register_categories( 'HTML::Object' ); | |||||||||
| 20 | 8 | ▶ | use parent qw( Module::Generic ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 8 | ▶ | use vars qw( $VERSION ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 8 | our $VERSION = 'v0.2.0'; | |||||||||
| 23 | }; | ||||||||||
| 24 | |||||||||||
| 25 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | sub init | ||||||||||
| 29 | 0 | ▶ | { | ||||||||
|
Subroutine
init: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 30 | 0 | my $self = shift( @_ ); | |||||||||
| 31 | 0 | my $bool = shift( @_ ); | |||||||||
| 32 | 0 | $self->{value} = $bool; | |||||||||
| 33 | 0 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 34 | 0 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | ▶ | $self->{value} = $self->{value} ? 1 : 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | return( $self ); | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 0 | ▶ | sub toString { return( shift->{value} ? 'true' : 'false' ); } | ||||||||
|
Subroutine
toString: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 40 | |||||||||||
| 41 | 0 | ▶ | sub valueOf { return( shift->{value} ? 1 : 0 ); } | ||||||||
|
Subroutine
valueOf: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| |||||||||||
| 42 | |||||||||||
| 43 | 8 | 1; | |||||||||
| 44 | # NOTE: POD | ||||||||||
| 45 | __END__ | ||||||||||