| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/Search.pm | ||||||||||
| 3 | ## Version v0.1.0 | ||||||||||
| 4 | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | ||||||||||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||||||||||
| 6 | ## Created 2023/11/05 | ||||||||||
| 7 | ## Modified 2023/11/05 | ||||||||||
| 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::Search; | ||||||||||
| 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 | our $VERSION = 'v0.1.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 | sub init | ||||||||||
| 29 | { | ||||||||||
| 30 | 0 | ▶ | my $self = shift( @_ ); | ||||||||
|
Subroutine
init: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 31 | 0 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 32 | 0 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 0 | ▶ | $self->{tag} = 'search' if( !CORE::length( "$self->{tag}" ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | return( $self ); | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 1 | 1; | |||||||||
| 38 | # NOTE: POD | ||||||||||
| 39 | __END__ | ||||||||||
| 40 | |||||||||||
| 41 | =encoding utf-8 | ||||||||||
| 42 | |||||||||||
| 43 | =head1 NAME | ||||||||||
| 44 | |||||||||||
| 45 | HTML::Object::DOM::Element::Search - HTML Object DOM Search Class | ||||||||||
| 46 | |||||||||||
| 47 | =head1 SYNOPSIS | ||||||||||
| 48 | |||||||||||
| 49 | use HTML::Object::DOM::Element::Search; | ||||||||||
| 50 | my $search = HTML::Object::DOM::Element::Search->new || | ||||||||||
| 51 | die( HTML::Object::DOM::Element::Search->error, "\n" ); | ||||||||||
| 52 | |||||||||||
| 53 | =head1 VERSION | ||||||||||
| 54 | |||||||||||
| 55 | v0.1.0 | ||||||||||
| 56 | |||||||||||
| 57 | =head1 DESCRIPTION | ||||||||||
| 58 | |||||||||||
| 59 | This interface represents a C<< <search> >> element and derives from the L<HTML::Object::DOM::Element> interface, but without implementing any additional properties or methods. | ||||||||||
| 60 | |||||||||||
| 61 | The C<< <search> >> HTML element is a container representing the parts of the document or application with form controls or other content related to performing a search or filtering operation. The C<< <search> >> element semantically identifies the purpose of the element's contents as having search or filtering capabilities. The search or filtering functionality can be for the website or application, the current web page or document, or the entire Internet or subsection thereof. | ||||||||||
| 62 | |||||||||||
| 63 | Example: | ||||||||||
| 64 | |||||||||||
| 65 | <header> | ||||||||||
| 66 | <h1>Movie website</h1> | ||||||||||
| 67 | <search> | ||||||||||
| 68 | <form action="./search/"> | ||||||||||
| 69 | <label for="movie">Find a Movie</label> | ||||||||||
| 70 | <input type="search" id="movie" name="q" /> | ||||||||||
| 71 | <button type="submit">Search</button> | ||||||||||
| 72 | </form> | ||||||||||
| 73 | </search> | ||||||||||
| 74 | </header> | ||||||||||
| 75 | |||||||||||
| 76 | |||||||||||
| 77 | =head1 INHERITANCE | ||||||||||
| 78 | |||||||||||
| 79 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+ | ||||||||||
| 80 | | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Search | | ||||||||||
| 81 | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+ | ||||||||||
| 82 | |||||||||||
| 83 | =head1 PROPERTIES | ||||||||||
| 84 | |||||||||||
| 85 | Inherits properties from its parent L<HTML::Object::DOM::Element> | ||||||||||
| 86 | |||||||||||
| 87 | =head1 METHODS | ||||||||||
| 88 | |||||||||||
| 89 | Inherits methods from its parent L<HTML::Object::DOM::Element> | ||||||||||
| 90 | |||||||||||
| 91 | =head1 AUTHOR | ||||||||||
| 92 | |||||||||||
| 93 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||||||||||
| 94 | |||||||||||
| 95 | =head1 SEE ALSO | ||||||||||
| 96 | |||||||||||
| 97 | L<Mozilla documentation on search element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search> | ||||||||||
| 98 | |||||||||||
| 99 | =head1 COPYRIGHT & LICENSE | ||||||||||
| 100 | |||||||||||
| 101 | Copyright(c) 2022-2023 DEGUEST Pte. Ltd. | ||||||||||
| 102 | |||||||||||
| 103 | All rights reserved | ||||||||||
| 104 | |||||||||||
| 105 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||||||||||
| 106 | |||||||||||
| 107 | =cut | ||||||||||