<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    PYX::Utils - A perl module for PYX common utilities.

SYNOPSIS
     use PYX::Utils;

     my $decoded_text = decode($text);
     my $encoded_text = encode($text);
     my $decoded_text = entity_decode($text);
     my $encoded_text = entity_encode($text);

SUBROUTINES
    "decode($text)"
             Decode characters.
             Currently decode newline to '\n'.
             Returns decoded text.

    "encode($text)"
             Encode characters.
             Currently encode '\n' to newline.
             Returns encoded text.

    "entity_decode($text)"
             Decode entities.
             - '&amp;lt;' =&gt; '&lt;'
             - '&amp;amp;' =&gt; '&amp;'
             - '&amp;quot;' =&gt; '"'
             Returns decoded text.

    "entity_encode($text)"
             Encode some chars for HTML/XML/SGML.
             Currenctly encode these characters:
             - '&lt;' =&gt; '&amp;lt;'
             - '&amp;' =&gt; '&amp;amp;'
             - '"' =&gt; '&amp;quot;'
             Returns encoded text.

EXAMPLE1
     use strict;
     use warnings;

     use PYX::Utils qw(decode);

     # Text.
     my $text = "foo\nbar";

     # Decode.
     my $decoded_text = decode($text);

     # Print to output.
     print "Text: $text\n";
     print "Decoded text: $decoded_text\n";

     # Output:
     # Text: foo
     # bar
     # Decoded text: foo\nbar

EXAMPLE2
     use strict;
     use warnings;

     use PYX::Utils qw(encode);

     # Text.
     my $text = 'foo\nbar';

     # Encode text.
     my $encoded_text = encode($text);

     # Print to output.
     print "Text: $text\n";
     print "Encoded text: $encoded_text\n";

     # Output:
     # Text: foo\nbar
     # Encoded text: foo
     # bar

EXAMPLE3
     use strict;
     use warnings;

     use PYX::Utils qw(entity_decode);

     # Text.
     my $text = 'foo&amp;lt;&amp;amp;&amp;quot;bar';

     # Decode entities.
     my $decoded_text = entity_decode($text);

     # Print to output.
     print "Text: $text\n";
     print "Decoded entities: $decoded_text\n";

     # Output:
     # Text: foo&amp;lt;&amp;amp;&amp;quot;bar
     # Decoded entities: foo&lt;&amp;"bar

EXAMPLE4
     use strict;
     use warnings;

     use PYX::Utils qw(entity_encode);

     # Text.
     my $text = 'foo&lt;&amp;"bar';

     # Encode entities.
     my $encoded_text = entity_encode($text);

     # Print to output.
     print "Text: $text\n";
     print "Encoded text: $encoded_text\n";

     # Output:
     # Text: foo&lt;&amp;"bar
     # Encoded text: foo&amp;lt;&amp;amp;&amp;quot;bar

DEPENDENCIES
    Exporter, HTML::Entities, Readonly.

SEE ALSO
    Task::PYX
        Install the PYX modules.

REPOSITORY
    &lt;https://github.com/tupinek/PYX-Utils&gt;

AUTHOR
    Michal Josef إ&nbsp;paؤچek skim@cpan.org

LICENSE AND COPYRIGHT
    آ© 2005-2020 Michal Josef إ&nbsp;paؤچek

    BSD 2-Clause License

VERSION
    0.05

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