| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/OList.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::OList; | ||||||||||
| 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( 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( :ol ); | ||||||||
|
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 | { | ||||||||||
| 31 | 0 | ▶ | my $self = shift( @_ ); | ||||||||
|
Subroutine
init: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 32 | 0 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 33 | 0 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | ▶ | $self->{tag} = 'ol' if( !CORE::length( "$self->{tag}" ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | return( $self ); | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | # Note: property compact is inherited | ||||||||||
| 39 | |||||||||||
| 40 | # Note: property reversed | ||||||||||
| 41 | 0 | ▶ | sub reversed : lvalue { return( shift->_set_get_property({ attribute => 'reversed', is_boolean => 1 }, @_ ) ); } | ||||||||
|
Subroutine
reversed: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 42 | |||||||||||
| 43 | # Note: property start | ||||||||||
| 44 | 0 | ▶ | sub start : lvalue { return( shift->_set_get_property( 'start', @_ ) ); } | ||||||||
|
Subroutine
start: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 45 | |||||||||||
| 46 | # Note: property type is inherited | ||||||||||
| 47 | |||||||||||
| 48 | 1 | 1; | |||||||||
| 49 | # NOTE: POD | ||||||||||
| 50 | __END__ | ||||||||||
| 51 | |||||||||||
| 52 | =encoding utf-8 | ||||||||||
| 53 | |||||||||||
| 54 | =head1 NAME | ||||||||||
| 55 | |||||||||||
| 56 | HTML::Object::DOM::Element::OList - HTML Object DOM OL List Class | ||||||||||
| 57 | |||||||||||
| 58 | =head1 SYNOPSIS | ||||||||||
| 59 | |||||||||||
| 60 | use HTML::Object::DOM::Element::OList; | ||||||||||
| 61 | my $ol = HTML::Object::DOM::Element::OList->new || | ||||||||||
| 62 | die( HTML::Object::DOM::Element::OList->error, "\n" ); | ||||||||||
| 63 | |||||||||||
| 64 | =head1 VERSION | ||||||||||
| 65 | |||||||||||
| 66 | v0.2.0 | ||||||||||
| 67 | |||||||||||
| 68 | =head1 DESCRIPTION | ||||||||||
| 69 | |||||||||||
| 70 | This interface provides special properties (beyond those defined on the regular L<HTML::Object::Element> interface it also has available to it by inheritance) for manipulating ordered list elements. | ||||||||||
| 71 | |||||||||||
| 72 | =head1 INHERITANCE | ||||||||||
| 73 | |||||||||||
| 74 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+ | ||||||||||
| 75 | | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::OList | | ||||||||||
| 76 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +-----------------------------------+ | ||||||||||
| 77 | |||||||||||
| 78 | =head1 PROPERTIES | ||||||||||
| 79 | |||||||||||
| 80 | Inherits properties from its parent L<HTML::Object::DOM::Element> | ||||||||||
| 81 | |||||||||||
| 82 | =head2 compact | ||||||||||
| 83 | |||||||||||
| 84 | Is a boolean value indicating that spacing between list items should be reduced. This property reflects the C<compact> attribute only, it does not consider the line-height CSS property used for that behavior in modern pages. | ||||||||||
| 85 | |||||||||||
| 86 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/compact> | ||||||||||
| 87 | |||||||||||
| 88 | =head2 reversed | ||||||||||
| 89 | |||||||||||
| 90 | Is a boolean value reflecting the C<reversed> and defining if the numbering is descending, that is its value is true, or ascending (false). | ||||||||||
| 91 | |||||||||||
| 92 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/reversed> | ||||||||||
| 93 | |||||||||||
| 94 | =head2 start | ||||||||||
| 95 | |||||||||||
| 96 | Is a long value reflecting the start and defining the value of the first number of the first element of the list and reflects the C<start> attribute. | ||||||||||
| 97 | |||||||||||
| 98 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/start> | ||||||||||
| 99 | |||||||||||
| 100 | =head2 type | ||||||||||
| 101 | |||||||||||
| 102 | Is a string value reflecting the C<type> and defining the kind of marker to be used to display. It can have the following values: | ||||||||||
| 103 | |||||||||||
| 104 | =over 4 | ||||||||||
| 105 | |||||||||||
| 106 | =item * '1' meaning that decimal numbers are used: 1, 2, 3, 4, 5, … | ||||||||||
| 107 | |||||||||||
| 108 | =item * 'a' meaning that the lowercase latin alphabet is used: a, b, c, d, e, … | ||||||||||
| 109 | |||||||||||
| 110 | =item * 'A' meaning that the uppercase latin alphabet is used: A, B, C, D, E, … | ||||||||||
| 111 | |||||||||||
| 112 | =item * 'i' meaning that the lowercase latin numerals are used: i, ii, iii, iv, v, … | ||||||||||
| 113 | |||||||||||
| 114 | =item * 'I' meaning that the uppercase latin numerals are used: I, II, III, IV, V, … | ||||||||||
| 115 | |||||||||||
| 116 | =back | ||||||||||
| 117 | |||||||||||
| 118 | See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement/type> | ||||||||||
| 119 | |||||||||||
| 120 | =head1 METHODS | ||||||||||
| 121 | |||||||||||
| 122 | Inherits methods from its parent L<HTML::Object::DOM::Element> | ||||||||||
| 123 | |||||||||||
| 124 | =head1 AUTHOR | ||||||||||
| 125 | |||||||||||
| 126 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||||||||||
| 127 | |||||||||||
| 128 | =head1 SEE ALSO | ||||||||||
| 129 | |||||||||||
| 130 | L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLOListElement>, L<Mozilla documentation on ol element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol> | ||||||||||
| 131 | |||||||||||
| 132 | =head1 COPYRIGHT & LICENSE | ||||||||||
| 133 | |||||||||||
| 134 | Copyright(c) 2021 DEGUEST Pte. Ltd. | ||||||||||
| 135 | |||||||||||
| 136 | All rights reserved | ||||||||||
| 137 | |||||||||||
| 138 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||||||||||
| 139 | |||||||||||
| 140 | =cut | ||||||||||