<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Log::FreeSWITCH::Line - FreeSWITCH log line parsing and serializing.

SYNOPSIS
     use Log::FreeSWITCH::Line qw(parse serialize);

     my $data_o = parse($data);
     my $data = serialize($data_o);

SUBROUTINES
    "parse($data)"
             Parse FreeSWITCH log line.
             Returns Log::FreeSWITCH::Line::Data object.

    "serialize($data_o)"
             Serialize Log::FreeSWITCH::Line::Data object to FreeSWITCH log line.
             Returns string.

ERRORS
     parse():
             Cannot parse data.
                     Data: %s

     serialize():
             Serialize object must be 'Log::FreeSWITCH::Line::Data' object.

EXAMPLE1
     use strict;
     use warnings;

     use Data::Printer;
     use Log::FreeSWITCH::Line qw(parse);

     # Log record.
     my $data = '2014-07-01 13:37:53.973562 [DEBUG] sofia.c:4045 inbound-codec-prefs [PCMA]';

     # Parse.
     my $data_o = parse($data);

     # Dump.
     p $data_o;

     # Output:
     # Log::FreeSWITCH::Line::Data  {
     #     Parents       Mo::Object
     #     public methods (0)
     #     private methods (1) : _datetime
     #     internals: {
     #         date        "2014-07-01",
     #         file        "sofia.c",
     #         file_line   4045,
     #         message     "inbound-codec-prefs [PCMA]",
     #         raw         "2014-07-01 13:37:53.973562 [DEBUG] sofia.c:4045 inbound-codec-prefs [PCMA]",
     #         time        "13:37:53.973562",
     #         type        "DEBUG"
     #     }
     # }

EXAMPLE2
     use strict;
     use warnings;

     use Log::FreeSWITCH::Line qw(serialize);
     use Log::FreeSWITCH::Line::Data;

     # Data.
     my $record = Log::FreeSWITCH::Line::Data-&gt;new(
             'date' =&gt; '2014-07-01',
             'file' =&gt; 'sofia.c',
             'file_line' =&gt; 4045,
             'message' =&gt; 'inbound-codec-prefs [PCMA]',
             'time' =&gt; '13:37:53.973562',
             'type' =&gt; 'DEBUG',
     );

     # Serialize and print to stdout.
     print serialize($record)."\n";

     # Output:
     # 2014-07-01 13:37:53.973562 [DEBUG] sofia.c:4045 inbound-codec-prefs [PCMA]

DEPENDENCIES
    Error::Pure, Exporter, Log::FreeSWITCH::Line::Data, Readonly,
    Scalar::Util.

SEE ALSO
    Log::FreeSWITCH::Line::Data
        Data object which represents FreeSWITCH log line.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Log-FreeSWITCH-Line&gt;

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

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

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

    BSD 2-Clause License

VERSION
    0.07

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