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

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


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!

No, this seems a bug.
Will look into it now.

Cheers


More information about the Dancer-users mailing list