Guest User

Untitled

a guest
Mar 6th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package Baraka::Controller::Find;
  2.  
  3. use strict;
  4. use warnings;
  5. use parent 'Catalyst::Controller';
  6.  
  7. # match /find
  8. sub base :Chained('/') :PathPart('find') :CaptureArgs(0) {
  9. my $self = shift;
  10. my ($c, @args) = @_;
  11.  
  12. $c->log->debug('where the chain?');
  13. $c->stash->{buildings} = $c->model('DB::Building');
  14. }
  15.  
  16. # match /find (end of chain)
  17. sub index :Chained('base') :PathPart('') :Args(0) {
  18. my $self = shift;
  19. my ($c, @args) = @_;
  20.  
  21. $c->stash(
  22. template => 'find/index.html'
  23. );
  24. }
  25.  
  26. 1;
Add Comment
Please, Sign In to add comment