[Mageia-dev] %{foo} vs. %foo

andre999 andr55 at laposte.net
Mon Aug 22 23:58:45 CEST 2011


Jerome Quelin a écrit :
> On 11/08/21 19:29 -0400, andre999 wrote:
>> It would be nice to have it clearly documented as to when it is
>> strictly necessary -- and why.  As well as giving a preferred style,
>> if any.
>> (If that hasn't already been done, of course.)
>
> in mdv time, i think the convention was to use %{} for variables, and %
> for macro that do sthg. that's why i'm using this in perl modules spec
> files:
>
>      version: %perl_convert_version %{upstream_version}
>
> regards,
> jérôme
>
That's what I was told to do by my mentor.
Maybe a little awkward adding the {...}, but worth the clarity.
Especially in a context like perl, it would make it a lot easier to follow the 
code.  (Particulary for someone not totally familiar with perl, like myself.)
So that has my vote :)

-- 
André


More information about the Mageia-dev mailing list