| 1 | package XTaTIK::Controller::Search; | ||
| 2 | |||
| 3 | 1 | our $VERSION = '0.005003'; # VERSION | |
| 4 | |||
| 5 | 1 | ▶ | use Mojo::Base 'Mojolicious::Controller'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use XTaTIK::Common qw/n_to_br set_product_pic/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 0 | ▶ | sub search { |
|
Subroutine
search: not called CC=2 SCAR=17.9
Pod
undocumented
| |||
| 9 | 0 | my $self = shift; | |
| 10 | |||
| 11 | 0 | my @prods = $self->products->get_by_id( | |
| 12 | $self->product_search->search( $self->param('term') ) | ||
| 13 | ); | ||
| 14 | |||
| 15 | 0 | set_product_pic( $self, @$_{qw/image number/} ) for @prods; | |
| 16 | |||
| 17 | 0 | $self->stash( | |
| 18 | template => 'root/search', | ||
| 19 | products => \@prods, | ||
| 20 | ); | ||
| 21 | } | ||
| 22 | |||
| 23 | 1 | 1; | |
| 24 | |||
| 25 | __END__ | ||