DateTime::Format::Builder::Parser::Quick(3pm) - phpMan

Command: man perldoc info search(apropos)  


DateTime::Format::Builder::ParsUserQContributed PerlDateTime::Format::Builder::Parser::Quick(3pm)

NAME
       DateTime::Format::Builder::Parser::Quick - Use another formatter, simply

VERSION
       version 0.82

SYNOPSIS
           use DateTime::Format::Builder (
           parsers => { parse_datetime => [
               { Quick => 'DateTime::Format::HTTP' },
               { Quick => 'DateTime::Format::Mail' },
               { Quick => 'DateTime::Format::IBeat' },
           ]});

       is the same as:

           use DateTime::Format::HTTP;
           use DateTime::Format::Mail;
           use DateTime::Format::IBeat;

           use DateTime::Format::Builder (
           parsers => { parse_datetime => [
               sub { eval { DateTime::Format::HTTP->parse_datetime( $_[1] ) } },
               sub { eval { DateTime::Format::Mail->parse_datetime( $_[1] ) } },
               sub { eval { DateTime::Format::IBeat->parse_datetime( $_[1] ) } },
           ]});

       (These two pieces of code can both be found in the test suite; one as quick.t, the other
       as fall.t.)

DESCRIPTION
       "Quick" adds a parser that allows some shortcuts when writing fairly standard and mundane
       calls to other formatting modules.

SPECIFICATION
       "Quick" has two keys, one optional.

       The "Quick" keyword should have an argument of either an object or a class name. If it's a
       class name then the class is "use"d.

       The "method" keyword is optional with a default of "parse_datetime". It's either name of
       the method to invoke on the object, or a reference to a piece of code.

       In any case, the resultant code ends up looking like:

            my $rv = $Quick->$method( $date );

SEE ALSO
       "datetime AT perl.org" mailing list.

       http://datetime.perl.org/

       perl, DateTime, DateTime::Format::Builder

SUPPORT
       Bugs may be submitted at
       <http://rt.cpan.org/Public/Dist/Display.html?Name=DateTime-Format-Builder> or via email to
       bug-datetime-format-builder AT rt.org <mailto:bug-datetime-format-builder AT rt.org>.

       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".

SOURCE
       The source code repository for DateTime-Format-Builder can be found at
       <https://github.com/houseabsolute/DateTime-Format-Builder>.

AUTHORS
       o   Dave Rolsky <autarch AT urth.org>

       o   Iain Truskett

COPYRIGHT AND LICENSE
       This software is Copyright (c) 2019 by Dave Rolsky.

       This is free software, licensed under:

         The Artistic License 2.0 (GPL Compatible)

       The full text of the license can be found in the LICENSE file included with this
       distribution.

perl v5.28.1                                2019-07-DateTime::Format::Builder::Parser::Quick(3pm)

Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2024-06-06 02:47 @3.134.103.74 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0!Valid CSS!