1DateTime::Format::BuildUesre:r:PCaornsterri:b:uQtDueaidtcekPT(ei3rm)le:D:oFcourmmeantt:a:tBiuoinlder::Parser::Quick(3)
2
3
4

NAME

6       DateTime::Format::Builder::Parser::Quick - Use another formatter,
7       simply
8

SYNOPSIS

10           use DateTime::Format::Builder (
11           parsers => { parse_datetime => [
12               { Quick => 'DateTime::Format::HTTP' },
13               { Quick => 'DateTime::Format::Mail' },
14               { Quick => 'DateTime::Format::IBeat' },
15           ]});
16
17       is the same as:
18
19           use DateTime::Format::HTTP;
20           use DateTime::Format::Mail;
21           use DateTime::Format::IBeat;
22
23           use DateTime::Format::Builder (
24           parsers => { parse_datetime => [
25               sub { eval { DateTime::Format::HTTP->parse_datetime( $_[1] ) } },
26               sub { eval { DateTime::Format::Mail->parse_datetime( $_[1] ) } },
27               sub { eval { DateTime::Format::IBeat->parse_datetime( $_[1] ) } },
28           ]});
29
30       (These two pieces of code can both be found in the test suite; one as
31       quick.t, the other as fall.t.)
32

DESCRIPTION

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

SPECIFICATION

38       "Quick" has two keys, one optional.
39
40       The "Quick" keyword should have an argument of either an object or a
41       class name. If it's a class name then the class is "use"d.
42
43       The "method" keyword is optional with a default of "parse_datetime".
44       It's either name of the method to invoke on the object, or a reference
45       to a piece of code.
46
47       In any case, the resultant code ends up looking like:
48
49            my $rv = $Quick->$method( $date );
50

THANKS

52       See the main module's section.
53

SUPPORT

55       Support for this module is provided via the datetime@perl.org email
56       list. See http://lists.perl.org/ for more details.
57
58       Alternatively, log them via the CPAN RT system via the web or email:
59
60           http://perl.dellah.org/rt/dtbuilder
61           bug-datetime-format-builder@rt.cpan.org
62
63       This makes it much easier for me to track things and thus means your
64       problem is less likely to be neglected.
65
67       Copyright (C) Iain Truskett, 2003. All rights reserved.
68
69       This library is free software; you can redistribute it and/or modify it
70       under the same terms as Perl itself, either Perl version 5.000 or, at
71       your option, any later version of Perl 5 you may have available.
72
73       The full text of the licences can be found in the Artistic and COPYING
74       files included with this module, or in perlartistic and perlgpl as
75       supplied with Perl 5.8.1 and later.
76

AUTHOR

78       Iain Truskett <spoon@cpan.org>
79

SEE ALSO

81       "datetime@perl.org" mailing list.
82
83       http://datetime.perl.org/
84
85       perl, DateTime, DateTime::Format::Builder
86
87
88
89perl v5.12.0                      20D1a0t-e0T5i-m1e4::Format::Builder::Parser::Quick(3)
Impressum