ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Vote: <local> for 1.6
Date Thu, 23 Oct 2003 12:44:53 GMT
On Thu, 23 Oct 2003, Jose Alberto Fernandez
<jalberto@cellectivity.com> wrote:
>> From: Stefan Bodewig [mailto:bodewig@apache.org] 

>> If you have several nested <ant>s, you'd have to check each level
>> for a <local> that was in place shadowing your global value.
> 
> But this is no more or less shadowing than me making one of the 
> <ant> calls passing a <param> with the value of the local.

Except that <param> is explicit and doesn't happen by accident.

> I think it is a mistake that <local> if local is not visible across
> <ant>, if that were the case then it should not be visible across
> <macrodef> either.

You have a compelling example here

>  <macrodef name="m">
>   <echo>${p}</echo>
>   <if>
>     <equals arg1="${p}" arg2="my local p"/>
>     <then>
>   	<antcall target="tm"/>
>     </then>
>   </if>
>  </macrodef>
> 
>  <target name="x">
>    <local name="p" value="my local p">
>      <m/>
>    </local>
>  </target>
> 
>  <target name="tm">
>   <echo>${p}</echo>
>  </target>
> 
>  <property name="p" value="my global p"/>
> 
>  [echo] my local p
>  [echo] my global p

and I currently don't have an answer for this.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message