21 May
2011
21 May
'11
9:29 p.m.
On 21/05/2011 22:17, ambs wrote:
Hello, Nick
On 21/05/2011 22:15, Nick Knutov wrote:
I see message
Dancer::layout has been deprecated since version 1.3050. use 'set layout => "value"'
But why was it done?
For example:
get '/' => sub { # do something my $message = template 'message', $data, {layout=>''}; # sending email with $message or inserting parsed data to DB # do something else template 'index', $data; };
So, in the new way I should read current setting('layout'), save it, set up new layout and restore old layout after if the old-style layout setup will be deprecated. This is ugly!
Nick, Are you sure you do not have a line with 'layout "foo";' anywhere else in the code? Thanks