Man Page: path::dispatcher::dispatch
Operating Environment: debian
Section: 3pm
Path::Dispatcher::Dispatch(3pm) User Contributed Perl Documentation Path::Dispatcher::Dispatch(3pm)NAMEPath::Dispatcher::Dispatch - a list of matchesSYNOPSISmy $dispatcher = Path::Dispatcher->new( rules => [ Path::Dispatcher::Rule::Tokens->new( tokens => [ 'attack', qr/^w+$/ ], block => sub { attack(shift->pos(2)) }, ), ], ); my $dispatch = $dispatcher->dispatch("attack goblin"); $dispatch->matches; # list of matches (in this case, one) $dispatch->has_matches; # whether there were any matches $dispatch->run; # attacks the goblinDESCRIPTIONDispatching creates a "dispatch" which is little more than a (possibly empty!) list of matches.ATTRIBUTESmatches The list of Path::Dispatcher::Match that correspond to the rules that were matched.METHODSrun Executes the first match. Each match's "run" in Path::Dispatcher::Match method is evaluated in scalar context. The return value of this method is a list of these scalars (or the first if called in scalar context). perl v5.12.4 2011-08-30 Path::Dispatcher::Dispatch(3pm)
| Related Man Pages |
|---|
| dat_evd_free(3dat) - opensolaris |
| dispatcher(3i) - debian |
| log::report::dispatcher::log4perl(3pm) - debian |
| path::dispatcher(3pm) - debian |
| path::dispatcher::match(3pm) - debian |
| Similar Topics in the Unix Linux Community |
|---|
| Introduction |
| One instance of comparing grep and awk |
| Weird 'find' results |
| A (ksh) Library For and From UNIX.com |