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

DESCRIPTION
    Tags helper to print HTML code of icon defined by Data::Icon.

    The HTML code contains icon defined by URL and alternate text (optional)
    or by UTF-8 character with foregroun and backround colors (optional).

SYNOPSIS
     use Tags::HTML::Icon;

     my $obj = Tags::HTML::Icon-&gt;new(%params);
     $obj-&gt;cleanup;
     $obj-&gt;init($icon);
     $obj-&gt;prepare;
     $obj-&gt;process;
     $obj-&gt;process_css;

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

    Constructor.

    *       "css"

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

            Default value is undef.

    *       "css_class"

            Default value is 'info-box'.

    *       "lang"

            Language in ISO 639-1 code.

            Default value is undef.

    *       "tags"

            Tags::Output object.

            Default value is undef.

  "cleanup"
     $obj-&gt;cleanup;

    Process cleanup after page run.

    In this case cleanup internal representation of a set by init.

    Returns undef.

  "init"
     $obj-&gt;init($icon);

    Process initialization in page run.

    Accepted $icon is Data::Icon.

    Returns undef.

  "prepare"
     $obj-&gt;prepare;

    Do nothing in case of this object.

    Returns undef.

  "process"
     $obj-&gt;process;

    Process Tags structure for HTML a element to output.

    Do nothing in case without inicialization by init.

    Returns undef.

  "process_css"
     $obj-&gt;process_css;

    Process CSS::Struct structure for HTML a element to output.

    Default CSS doesn't exist.

    Do nothing in case without inicialization by init.

    Returns undef.

ERRORS
     new():
             From Mo::utils::CSS::check_css_class():
                     Parameter '%s' has bad CSS class name.
                             Value: %s
                     Parameter '%s' has bad CSS class name (number on begin).
                             Value: %s
             From Tags::HTML::new():
                     Parameter 'css' must be a 'CSS::Struct::Output::*' class.
                     Parameter 'tags' must be a 'Tags::Output::*' class.

     init():
             Icon object is required.
             Icon object must be a instance of 'Data::Icon'.

     process():
             From Tags::HTML::process():
                     Parameter 'tags' isn't defined.

     process_css():
             From Tags::HTML::process_css():
                     Parameter 'css' isn't defined.

EXAMPLE
     use strict;
     use warnings;

     use CSS::Struct::Output::Indent;
     use Data::Icon;
     use Tags::HTML::Icon;
     use Tags::Output::Indent;
     use Unicode::UTF8 qw(decode_utf8 encode_utf8);

     # Object.
     my $css = CSS::Struct::Output::Indent-&gt;new;
     my $tags = Tags::Output::Indent-&gt;new(
             'xml' =&gt; 1,
     );
     my $obj = Tags::HTML::Icon-&gt;new(
             'css' =&gt; $css,
             'tags' =&gt; $tags,
     );

     # Data object for icon.
     my $icon = Data::Icon-&gt;new(
             'bg_color' =&gt; 'grey',
             'char' =&gt; decode_utf8('��'),
             'color' =&gt; 'red',
     );

     # Initialize.
     $obj-&gt;init($icon);

     # Process.
     $obj-&gt;process;
     $obj-&gt;process_css;

     # Print out.
     print "HTML:\n";
     print encode_utf8($tags-&gt;flush);
     print "\n\n";
     print "CSS:\n";
     print $css-&gt;flush;

     # Output:
     # HTML:
     # &lt;span class="icon"&gt;
     #   &lt;span style="background-color:grey;color:red;"&gt;
     #     ��
     #   &lt;/span&gt;
     # &lt;/span&gt;
     # 
     # CSS:
     #

DEPENDENCIES
    Class::Utils, Error::Pure, Mo::utils::CSS, Scalar::Util, Tags::HTML.

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

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

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

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

    BSD 2-Clause License

VERSION
    0.01

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