vendredi 26 mai 2017, 08:56:22 CEST iaw4 wrote: > > dear M users: right now, I am using > > <% my $rv; ...lots of perl code to build up $rv %> <%== $rv %> > > is this the recommended way? or is there a combining method? > > regards, > > /iaw > >
For readability, I would suggest using % my $rv; % lots of perl code to build up $rv <%== $rv %> But that's just an aesthetic change, you way is good. But do you really need to build $rv in your template? Always better to put big chunks of code in a controller. Be aware that <%== $rv %> doesn't escape html tags! I may be what you want, but if you want to escape the html tags, you should use <%= $rv %> -- Luc https://fiat-tux.fr/ https://luc.frama.io/ Internet n'est pas compliqué, Internet est ce que vous en faites. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
