> > ...
> > What's about
> >
> > <a href=list?page=2&[+ [ %fdat ]  +]>Page 2</a>
> >
> > this should exactly do what you want, doesn't it?
>
>   I don't understand how this is supposed to work but no, it doesn't do
> what I need, it prints
>
> page=2&ARRAY(0x82f9884)
>

Oops, I missed the quotes, must be:

<a href="list?page=2&[+ [ %fdat ]  +]">Page 2</a>

otherwise Embperl cannot recognise that the [+ .. +] belongs to the href
attribute.

When you are inside a URL (e.g. href, src) Embperl converts a array ref
automaticly to

 a=1&b=2&c=3

etc.

Gerald

>   - Robert
>
>
> P.S. My hack finally works, it looks like this:
>
> <a href=list[+ qstring page => 2, lang => 'de' +]>
>
> sub qstring {
>       my %fdat = (%HTML::Embperl::fdat, @_);
>       my @qs;
>
>       foreach my $f (sort keys %fdat) {
>               my @values = split '\t', $fdat{$f};
>               push @qs, @values ? map { "$f=$_" } @values : "$f=";
>       }
>       return @qs ? '?' . join('&', @qs) : '';
> }
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to