[Dancer-users] Dancer::layout has been deprecated
Nick Knutov
mail at knutov.com
Sat May 21 23:15:18 CEST 2011
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!
Is there any other ways to do it beautiful?
May be it is better to do it optional and not to deprecate this feature?
--
Best Regards,
Nick Knutov
http://knutov.com
ICQ: 272873706
Voice: +7-904-84-23-130
More information about the Dancer-users
mailing list