Package: ferm
Version: 2.0.7-1
Severity: normal

This works as expected:

    @if $condition @def $value = "foo";
    @else @def $value = "bar";

but this does not:

    @if $condition {
        @def $value = "foo";
    } @else {
        @def $value = "bar";
    }

because $value is only defined in the blocks, not the surrounding scope,
which makes it useless.

(This is simplified from a practical case, where I'd like the
condition to control several definitions of variables, functions, etc.
Instead I have to push the condition down inside each definition as an
ugly workaround.)

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ferm depends on:
ii  debconf                       1.5.30     Debian configuration management sy
ii  iptables                      1.4.6-2    administration tools for packet fi
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  perl                          5.10.1-11  Larry Wall's Practical Extraction 

Versions of packages ferm recommends:
pn  libnet-dns-perl               <none>     (no description available)

ferm suggests no packages.

-- debconf information excluded



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to