param* and order

Neven Has haski at sezampro.yu
Wed Feb 14 08:41:38 PST 2001


On Tue, Feb 13, 2001 at 10:37:35AM +0000, Bryan Dumm wrote:
> Anyone want to take a stab @ param* and when an "order" 
> matters. Prime example <patch>. The code ain't right. Any
> takers?

Hm, not as easy as I first thought. :)

Is seems (from "perldoc -f sort") that:

        foreach (map { $_->[0] } sort { $a->[1] <=> $b->[1] }
                 map { [$_, /param(\d+)/] } keys %{$elt->atts()}) {

                $params .= ${$elt->atts()}{$_} . " " if (/^param/);
        }

would work. And it does actually, not counting that it's ugly as hell.

But I'm having problems with "<=>". 
Since our handlers are XML now, I'm getting "not well-formed" friendly warning.
I'm still working on a solution (would CDATA trick work?), but if somebody
knows the answer to this, please let us know. 
Changing the profile syntax is out of the question, I suppose. =:)

BTW, do you _really_ need so many attributes ? ;)

Neven







More information about the alfs-discuss mailing list