I've been using that pattern everywhere. There are no return statements the only other options I see are making all variables global to the script or eliminating the use of macros entirely (spaghetti code). Is there a better way?
Caleb Sergiu Dumitriu wrote: > Lots of goodies, but we can't upgrade until we fix the bad usage of > macros, see https://issues.apache.org/jira/browse/VELOCITY-681 > > On 05/01/2010 06:20 PM, Vincent Massol wrote: >> fyi >> >> -Vincent >> >> Begin forwarded message: >> >>> From: Nathan Bubna<[email protected]> >>> Date: April 28, 2010 12:53:50 AM GMT+02:00 >>> To: Velocity Developers List<[email protected]>, Velocity Users >>> List<[email protected]>, [email protected] >>> Subject: [ANNOUNCE] Velocity Engine 1.7-beta1 release available >>> >>> The Velocity developers are please to announce the availability of >>> Velocity Engine 1.7-beta1. >>> >>> Downloads can be found here: >>> http://velocity.apache.org/download.cgi >>> >>> A great deal of work has been done since the 1.6 branch. Here's a taste: >>> >>> - Your macros can now be called with bodies when you want: >>> #macro(foo)Here is $bodyContent#end >>> #...@foo()body content!#end >>> - Quotes can be escaped in strings by doubling them: >>> #set( $foo = "$person said, ""$comment"" " ) >>> #set( $bar = 'Joe said, ''Hi!'' ' ) >>> - The flawed #literal directive has been replaced with: >>> #[[ This is included but not parsed, so #if and $foo need no >>> escaping.]]# >>> >>> Also included are namespacing improvements, better #break and #stop, >>> bracketed index syntax, and more! For full details, please see the >>> change log: >>> http://velocity.apache.org/engine/devel/changes-report.html >>> >>> This should work as a drop-in replacement for Velocity 1.6.3 in the >>> vast majority of cases. However, there have been a number of >>> deprecations (should result in warnings in your log output) and a few >>> minor behavioral changes, all of which are explained in the change >>> log. :) > > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

