DateTime::Format::Builder::ParsUserDContributed)PDateTime::Format::Builder::Parser::Dispatch(3pm)
NAME
DateTime::Format::Builder::Parser::Dispatch - Dispatch parsers by group
VERSION
version 0.83
SYNOPSIS
package SampleDispatch;
use DateTime::Format::Builder (
parsers => {
parse_datetime => [
{
Dispatch => sub {
return 'fnerk';
}
}
]
},
groups => {
fnerk => [
{
regex => qr/^(\d{4})(\d\d)(\d\d)$/,
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.
SIDE EFFECTS
Your group parser can also be a Dispatch parser. Thus you could potentially end up with an
infinitely recursive parser.
SEE ALSO
"datetime AT perl.org" mailing list.
http://datetime.perl.org/
perl, DateTime, DateTime::Format::Builder
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
o Dave Rolsky <autarch AT urth.org>
o Iain Truskett <spoon AT 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.
perl v5.30.3 2020-DateTime::Format::Builder::Parser::Dispatch(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
2026-01-10 12:04 @216.73.216.127 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)