Catalyst-View-Text-MicroTemplate-PerRequest

 view release on metacpan or  search on metacpan

lib/Catalyst/View/Text/MicroTemplate/PerRequest.pm  view on Meta::CPAN

    sub root :Chained(/) CaptureArgs(0) {
      my ($self, $c) = @_;
      $c->view('HTML')->data->set(z=>1);
    }

    sub midpoint :Chained(root) CaptureArgs(0) {
      my ($self, $c) = @_;
      $c->view('HTML')->data->set(y=>1);
    }

    sub endpoint :Chained(midpoint) Args(0) {
      my ($self, $c) = @_;
      $c->view('JSON')->created({
        a => 1,
        b => 2,
        c => 3,
      });
    }

    # template $HOME/root/endpoint.mt
    
    This is my template
    Here's some placeholders
    a => <?= $a ?>
    b => <?= $b ?>
    c => <?= $c ?>
    y => <?= $y ?>
    z => <?= $z ?>


 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.109 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )