File: DispatchNode.pm

package info (click to toggle)
libweb-simple-perl 0.016-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 348 kB
  • sloc: perl: 1,588; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 337 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package Web::Simple::DispatchNode;

use Moo;

extends 'Web::Dispatch::Node';

has _app_object => (is => 'ro', init_arg => 'app_object', required => 1);

# this ensures that the dispatchers get called as methods of the app itself
around _curry => sub {
  my ($orig, $self) = (shift, shift);
  $self->$orig($self->_app_object, @_);
};

1;