Catalyst-Plugin-CurrentComponents

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN


  sub set_model_by_return :Chained(/) CaptureArgs(0) {
    my ($self, $c) = @_;
    return $c->model('CurrentModel2');
  }

    sub midpoint :Chained('set_model_by_return') PathPart('') CaptureArgs(0) {
      my ($self, $c) = @_;
    }

      sub endpoint :Chained('midpoint') PathPart('') Args(0) {
        my ($self, $c) = @_;
        $c->res->body(ref $c->model);
      }

  sub set_view_by_return :Chained(/) CaptureArgs(0) {
    my ($self, $c) = @_;
    return $c->model('CurrentView');
  }

    sub midpoint2 :Chained('set_view_by_return') PathPart('') CaptureArgs(0) {
      my ($self, $c) = @_;
    }

      sub endpoint2 :Chained('midpoint2') PathPart('') Args(0) {
        my ($self, $c) = @_;
        $c->res->body(ref $c->view);
      }

  package MyApp;
  use Catalyst 'CurrentComponents';

  MyApp->config(
    default_model=>'CurrentModel',
    'Plugin::CurrentComponents' => {



( run in 0.253 second using v1.01-cache-2.11-cpan-27979f6cc8f )