| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## HTML Object - ~/lib/HTML/Object/Boolean.pm | ||||||||||
| 3 | ## Version v0.2.0 | ||||||||||
| 4 | ## Copyright(c) 2021 DEGUEST Pte. Ltd. | ||||||||||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||||||||||
| 6 | ## Created 2021/04/22 | ||||||||||
| 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::Boolean; | ||||||||||
| 15 | BEGIN | ||||||||||
| 16 | { | ||||||||||
| 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' ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 1 | ▶ | use parent qw( Module::Generic::Boolean ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 1 | ▶ | use vars qw( $VERSION ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 1 | our $VERSION = 'v0.2.0'; | |||||||||
| 23 | }; | ||||||||||
| 24 | |||||||||||
| 25 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub getChildNodes { return( shift->new_array ); } | ||||||||
|
Subroutine
getChildNodes: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub getAttributes { return( shift->new_array ); } | ||||||||
|
Subroutine
getAttributes: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 31 | |||||||||||
| 32 | 0 | ▶ | sub False { return( shift->false ); } | ||||||||
|
Subroutine
False: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | sub string_value { return( shift->to_literal->value ); } | ||||||||
|
Subroutine
string_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 35 | |||||||||||
| 36 | 0 | ▶ | sub to_boolean { return( $_[0] ); } | ||||||||
|
Subroutine
to_boolean: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 37 | |||||||||||
| 38 | sub to_literal | ||||||||||
| 39 | { | ||||||||||
| 40 | 0 | ▶ | require HTML::Object::Literal; | ||||||||
|
Subroutine
to_literal: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 41 | 0 | ▶ | return( HTML::Object::Literal->new( shift->value ? 'true' : 'false' ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | sub to_number | ||||||||||
| 45 | { | ||||||||||
| 46 | 0 | ▶ | require HTML::Object::Number; | ||||||||
|
Subroutine
to_number: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 47 | 0 | return( HTML::Object::Number->new( shift->value ) ); | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 0 | ▶ | sub True { return( shift->true ); } | ||||||||
|
Subroutine
True: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 51 | |||||||||||
| 52 | 0 | ▶ | sub value { return( ${$_[0]} ); } | ||||||||
|
Subroutine
value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 53 | |||||||||||
| 54 | 1 | 1; | |||||||||
| 55 | # NOTE: POD | ||||||||||
| 56 | __END__ | ||||||||||