decode: help

Josh Narins <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
What exactly is it supposed to mean, the phrase "decode:" ?

I also don't have it working as advertised. Not sure whether it is a bug
or not.

extra = 
  [
   {
    c=>1,
    short=>'One Thing',
    selected=>'selected',
   },
   {
    c=>2,
    short=>'Another',
   }
  ]

<select name="c">
  <option petal:repeat="e extra" petal:content="e/short" 
          petal:attributes="value e/c; 
                         selected decode: e/selected 'selected' 'selected'" />
</select>

The selected attribute is correct for c=1, but I get selected="0" for
c=2. That doesn't seem right.

Thanks in advance,
Josh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.