Egg::Dispatch::Fast - Another dispatch class.


Egg-Release documentation  | view source Contained in the Egg-Release distribution.

Index


NAME

Top

Egg::Dispatch::Fast - Another dispatch class.

SYNOPSIS

Top

  package MyApp::Dispatch;
  use base qw/ Egg::Dispatch::Fast /;

  Egg->dispatch_map(

    _default => {
      label=> 'index page.',
      action => sub { ... },
      },

    # When only the label is set, an empty CODE reference is set to action.
    # And, hooo.tt was set in the template.
    hooo => { label => 'hooo page.' },

    hoge => {
      label => 'hoge page',
      action => sub { ... },
      },

    boo => sub { ... },

    );

DESCRIPTION

Top

EggDispatch::Standard it is a plugin to do more high-speed Dispatch.

As for 'dispatch_map', only a single hierarchy is treatable.

The regular expression etc. cannot be used for the key.

The value to the key should be CODE reference.

The argument passed for the CODE reference is Egg::Dispatch::Standard. It is similar.

METHODS

Top

Egg::Dispatch has been succeeded to.

dispatch

The Egg::Dispatch::Fast::handler object is returned.

  my $d= $e->dispatch;

HANDLER METHODS

Top

mode_now

The action matched with 'dispatch_map' is returned as a mode.

* The value of 'default_mode' method is returned when failing in the match.

SEE ALSO

Top

Egg::Release, Egg::Dispatch,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Egg-Release documentation  | view source Contained in the Egg-Release distribution.