Re: xsub apidoc ordering RFC
- From: "Peter Haworth" <pmh edison ioppublishing com>
- To: gtk-perl-list gnome org
- Subject: Re: xsub apidoc ordering RFC
- Date: Fri, 20 Feb 2004 10:36:47 +0000
On Thu, 19 Feb 2004 19:15:19 -0500 (EST), Ross McFarland wrote:
muppet said:
to further exacerbate things, what if the (get_|set_) prefix was
ignored for the sake of sorting? that way get and set would be together,
and the things they set would be alphabetized.
i think the answer might be to replace set/get with nothing, remove them.
but i don't know what that will do for the alphebetical order, i'll have
to play some more with it.
How about moving the get_/set_ to the end, so that each pair is sorted
consistently?
@$xsubs=sort {
for(my $at=$a->{symname}, my $bt=$b->{symname}){
s/^.+:://;
s/^new/\x00/;
s/^(get|set)_(.*)/${2}_$1/ for $at,$bt;
# Or replace with /\xff${2}_$1/ to sort all accessors at the end
}
$at cmp $bt;
} @$xsubs;
--
Peter Haworth pmh edison ioppublishing com
"For an industry which can boast of having some of the brightest people on
the planet as members, we sure do a lot of stupid f***ing things." - JKH
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]