<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Tags::HTML::Page::Begin - Tags helper for HTML page begin.

SYNOPSIS
     use Tags::HTML::Page::Begin;

     my $obj = Tags::HTML::Page::Begin-&gt;new(%params);
     $obj-&gt;process;

METHODS
  "new"
     my $obj = Tags::HTML::Page::Begin-&gt;new(%params);

    Constructor.

    *       "application-name"

            Application name.

            Default name is undef.

    *       "author"

            Author name.

            Default value is undef.

    *       "base_href"

            Base link (&lt;base href="https://skim.cz" /&gt;.

            Default value is undef.

    *       "base_target"

            Base target. It's used in if 'base_href' parameter exists.

            Default value is undef.

    *       "css"

            'CSS::Struct::Output' object for process_css processing.

            Default value is undef.

    *       "css_src"

            List of CSS link structures.

             Structure is something like:
             {
               'link' =&gt; '/foo.css',
               'media' =&gt; 'screen',
             }

            Default value is [].

    *       "charset"

            Document character set.

            Parameter is required.

            Default value is 'UTF-8'.

    *       "description"

            Document description.

            Default value is undef.

    *       "doctype"

            Document doctype string.

            Default value is '&lt;!DOCTYPE html&gt;'.

    *       "favicon"

            Favorite icon image link. Supported images are 'ICO', 'PNG',
            'GIF', 'SVG' and 'JPG' files.

            Default value is undef.

    *       "generator"

            Generator value.

            Default value is 'Perl module: Tags::HTML::Page::Begin, Version:
            __MODULE_VERSION__'.

    *       "html_lang"

            HTML element lang attribute. Creates html element in form: &lt;html
            lang="en"&gt;

            Default value is 'en'.

    *       "http_equiv_content_type"

            http-equiv content-type meta element. If defined creates meta in
            form: &lt;meta http-equiv="Content-Type" content="text/html;
            charset=UTF-8" /&gt; Unless defined creates meta in form: &lt;meta
            charset="UTF-8" /&gt;

            Defaut value is 'text/html'.

    *       "keywords"

            Document keywords.

            Default value is undef.

    *       "lang"

            Hash with language information for output. Keys are: 'title'.

            Default value is reference to hash with these value: 'title' =&gt;
            'Page title'

    *       "refresh"

            Page refresh time in seconds.

            Default value is undef.

    *       "robots"

            Robots meta.

            Default value is undef.

    *       "rss"

            RSS link.

            Default value is undef.

    *       "script_js"

            List of JavaScript scripts.

            Default value is reference to blank array.

    *       "script_js_src"

            List of JavaScript links.

            Default value is reference to blank array.

    *       "tags"

            'Tags::Output' object.

            It's required.

            Default value is undef.

    *       "viewport"

            Document viewport.

            Default value is undef.

  "process"
     $obj-&gt;process;

    Process Tags structure for output.

    Returns undef.

ERRORS
     new():
             Parameter 'css' must be a 'CSS::Struct::Output::*' class.
             Parameter 'css_src' must be a array.
             Parameter 'css_src' must be a array of hash structures.
             Parameter 'css_src' must be a array of hash structures with 'media' and 'link' keys.
             Parameter 'charset' is required.
             Parameter 'script_js' must be a array.
             Parameter 'script_js_src' must be a array.
             Parameter 'tags' must be a 'Tags::Output::*' class.
             From Class::Utils::set_params():
                     Unknown parameter '%s'.

EXAMPLE1
     use strict;
     use warnings;

     use CSS::Struct::Output::Indent;
     use Tags::HTML::Page::Begin;
     use Tags::HTML::Page::End;
     use Tags::Output::Indent;

     # Object.
     my $tags = Tags::Output::Indent-&gt;new(
             'preserved' =&gt; ['style'],
             'xml' =&gt; 1,
     );
     my $css = CSS::Struct::Output::Indent-&gt;new;
     my $begin = Tags::HTML::Page::Begin-&gt;new(
             'css' =&gt; $css,
             'tags' =&gt; $tags,
     );
     my $end = Tags::HTML::Page::End-&gt;new(
             'tags' =&gt; $tags,
     );

     # Process page
     $css-&gt;put(
            ['s', 'div'],
            ['d', 'color', 'red'],
            ['d', 'background-color', 'black'],
            ['e'],
     );
     $begin-&gt;process;
     $tags-&gt;put(
            ['b', 'div'],
            ['d', 'Hello world!'],
            ['e', 'div'],
     );
     $end-&gt;process;

     # Print out.
     print $tags-&gt;flush;

     # Output:
     # &lt;!DOCTYPE html&gt;
     # &lt;html lang="en"&gt;
     #   &lt;head&gt;
     #     &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
     #     &lt;meta name="generator" content=
     #       "Perl module: Tags::HTML::Page::Begin, Version: 0.06" /&gt;
     #     &lt;title&gt;
     #       Page title
     #     &lt;/title&gt;
     #     &lt;style type="text/css"&gt;
     # div {
     #      color: red;
     #      background-color: black;
     # }
     # &lt;/style&gt;
     #   &lt;/head&gt;
     #   &lt;body&gt;
     #     &lt;div&gt;
     #       Hello world!
     #     &lt;/div&gt;
     #   &lt;/body&gt;
     # &lt;/html&gt;

DEPENDENCIES
    Class::Utils, Error::Pure, List::MoreUtils, Readonly.

SEE ALSO
    Tags::HTML::Page::End
        Tags helper for HTML page end.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Tags-HTML-Page-Begin&gt;

AUTHOR
    Michal Josef �麖a�嶤k &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    穢 Michal Josef �麖a�嶤k 2020

    BSD 2-Clause License

VERSION
    0.11

</pre></body></html>