Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checkpoint after getting the DBIx::Class and route changes working.
- Loading branch information
Jeff Boes
committed
Oct 31, 2013
1 parent
2580f8f
commit 39078e9
Showing
5 changed files
with
55 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package Flowers::Routes::Item; | ||
|
||
use strict; | ||
use Dancer ':syntax'; | ||
use Flowers::Products qw(product); | ||
use Data::Dumper; | ||
|
||
get '/product/:seo/:sku' => sub { | ||
my $product = product( | ||
uc params->{sku}, | ||
); | ||
if (ref $product eq 'ARRAY') { | ||
$product = $product->[0]; | ||
} | ||
|
||
debug 'product ', join ',', %$product; | ||
|
||
template 'product', $product; | ||
}; | ||
|
||
true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters