# DateTime::Format::Builder::Parser::Quick - Use another formatter, simply - perldoc - [phpMan]

## NAME
    [DateTime::Format::Builder::Parser::Quick](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3ABuilder%3A%3AParser%3A%3AQuick/markdown) - Use another formatter, simply

## VERSION
    version 0.83

## SYNOPSIS
        use [DateTime::Format::Builder](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3ABuilder/markdown) (
            parsers => {
                parse_datetime => [
                    { Quick => '[DateTime::Format::HTTP](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AHTTP/markdown)' },
                    { Quick => '[DateTime::Format::Mail](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AMail/markdown)' },
                    { Quick => '[DateTime::Format::IBeat](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AIBeat/markdown)' },
                ]
            }
        );

        # is the same as

        use [DateTime::Format::HTTP](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AHTTP/markdown);
        use [DateTime::Format::Mail](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AMail/markdown);
        use [DateTime::Format::IBeat](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AIBeat/markdown);

        use [DateTime::Format::Builder](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3ABuilder/markdown) (
            parsers => {
                parse_datetime => [
                    sub {
                        eval { [DateTime::Format::HTTP](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AHTTP/markdown)->parse_datetime( $_[1] ) }
                    },
                    sub {
                        eval { [DateTime::Format::Mail](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AMail/markdown)->parse_datetime( $_[1] ) }
                    },
                    sub {
                        eval { [DateTime::Format::IBeat](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3AIBeat/markdown)->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@perl.org>" mailing list.

    <http://datetime.perl.org/>

    perl, DateTime, [DateTime::Format::Builder](https://www.chedong.com/phpMan.php/perldoc/DateTime%3A%3AFormat%3A%3ABuilder/markdown)

## SUPPORT
    Bugs may be submitted at <<https://github.com/houseabsolute/DateTime-Format-Builder/issues>>.

    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
    *   Dave Rolsky <<autarch@urth.org>>

    *   Iain Truskett <<spoon@cpan.org>>

## COPYRIGHT AND LICENSE
    This software is Copyright (c) 2020 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.

