From: Tony Cook Date: Sat, 15 Oct 2011 02:00:23 +0000 (+1100) Subject: [rt #71675] make the APIRef synopsis ordering consistent X-Git-Tag: v0.85_02~10 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/81409c5e324d835d03dbbc3b05789e65a313d951 [rt #71675] make the APIRef synopsis ordering consistent Older versions of perl could order it differently --- diff --git a/Changes b/Changes index a57f364f..666a2cad 100644 --- a/Changes +++ b/Changes @@ -56,6 +56,10 @@ Bug fixes: - check there's at least one coefficient for the convolution filter https://rt.cpan.org/Ticket/Display.html?id=68993 + - make the APIRef synopsis ordering consistent, older versions of + perl could order it differently. + https://rt.cpan.org/Ticket/Display.html?id=71675 + Imager 0.85_01 - 10 Oct 2011 ============== diff --git a/apidocs.perl b/apidocs.perl index c0c389a5..b516472a 100644 --- a/apidocs.perl +++ b/apidocs.perl @@ -10,7 +10,7 @@ my %funcs = map { $_ => 1 } @funcs; # look for files to parse my $mani = maniread; -my @files = grep /\.(c|im|h)$/, keys %$mani; +my @files = sort grep /\.(c|im|h)$/, keys %$mani; # scan each file for =item \b my $func; @@ -107,7 +107,11 @@ EOS for my $cat (sort { lc $a cmp lc $b } keys %cats) { print OUT "\n # $cat\n"; - for my $func (grep $funcsyns{$_}, sort { $order{$a} <=> $order{$b} } @{$cats{$cat}}) { + my @funcs = @{$cats{$cat}}; + my %orig; + @orig{@funcs} = 0 .. $#funcs; + @funcs = sort { $order{$a} <=> $order{$b} || $orig{$a} <=> $orig{$b} } @funcs; + for my $func (grep $funcsyns{$_}, @funcs) { my $syn = $funcsyns{$func}; $syn =~ s/^/ /gm; print OUT $syn; diff --git a/lib/Imager/APIRef.pod b/lib/Imager/APIRef.pod index b03206bb..afd956de 100644 --- a/lib/Imager/APIRef.pod +++ b/lib/Imager/APIRef.pod @@ -70,12 +70,12 @@ Imager::APIRef - Imager's C API - reference. # Image # Image creation/destruction - i_img *img = i_img_8_new(width, height, channels); i_img *img = i_sametype(src, width, height); i_img *img = i_sametype_chans(src, width, height, channels); - i_img *img = i_img_pal_new(width, height, channels, max_palette_size) - i_img *img = i_img_double_new(width, height, channels); i_img *img = i_img_16_new(width, height, channels); + i_img *img = i_img_8_new(width, height, channels); + i_img *img = i_img_double_new(width, height, channels); + i_img *img = i_img_pal_new(width, height, channels, max_palette_size) i_img_destroy(img) # Image Implementation