[Dancer-users] Dancer::layout has been deprecated

ambs ambs+dancer at perl-hackers.net
Sat May 21 23:29:41 CEST 2011


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


More information about the Dancer-users mailing list