debian man page for datetime::format::builder::parser::dispatch

Query: datetime::format::builder::parser::dispatch

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

DateTime::Format::Builder::Parser::Dispatch(3pm)	User Contributed Perl Documentation	  DateTime::Format::Builder::Parser::Dispatch(3pm)

NAME
DateTime::Format::Builder::Parser::Dispatch - Dispatch parsers by group
SYNOPSIS
package SampleDispatch; use DateTime::Format::Builder ( parsers => { parse_datetime => [ { Dispatch => sub { return 'fnerk'; } } ] }, groups => { fnerk => [ { regex => qr/^(d{4})(dd)(dd)$/, params => [qw( year month day )], }, ] } );
DESCRIPTION
"Dispatch" adds another parser type to "Builder" permitting dispatch of parsing according to group names.
SPECIFICATION
"Dispatch" has just one key: "Dispatch". The value should be a reference to a subroutine that returns one of: o "undef", meaning no groups could be found. o An empty list, meaning no groups could be found. o A single string, meaning: use this group o A list of strings, meaning: use these groups in this order. Groups are specified much like the example in the SYNOPSIS. They follow the same format as when you specify them for methods.
SIDEEFFECTS
Your group parser can also be a Dispatch parser. Thus you could potentially end up with an infinitely recursive parser.
THANKS
See the main module's section.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details. Alternatively, log them via the CPAN RT system via the web or email: http://perl.dellah.org/rt/dtbuilder bug-datetime-format-builder@rt.cpan.org This makes it much easier for me to track things and thus means your problem is less likely to be neglected.
LICENCE AND COPYRIGHT
Copyright X Iain Truskett, 2003. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.000 or, at your option, any later version of Perl 5 you may have available. The full text of the licences can be found in the Artistic and COPYING files included with this module, or in perlartistic and perlgpl as supplied with Perl 5.8.1 and later.
AUTHOR
Iain Truskett <spoon@cpan.org>
SEE ALSO
"datetime@perl.org" mailing list. http://datetime.perl.org/ perl, DateTime, DateTime::Format::Builder perl v5.10.1 2010-03-14 DateTime::Format::Builder::Parser::Dispatch(3pm)
Related Man Pages
datetime::format::builder::parser(3pm) - debian
datetime::format::builder::parser::regex(3pm) - debian
datetime::format::builder::parser::generic(3pm) - debian
datetime::format::epoch::activedirectory(3pm) - debian
html::formfu::inflator::datetime(3pm) - debian
Similar Topics in the Unix Linux Community
Builder 0.02 (Default branch)
parsing a log file
datetime.pm
meaning of &lt;&lt;!
Perl: Sorting a hash value that is a list.