This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Teach porting/diag.t about SVf32 and SVf256
authorFather Chrysostomos <sprout@cpan.org>
Wed, 5 Oct 2011 20:33:36 +0000 (13:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 6 Oct 2011 20:01:12 +0000 (13:01 -0700)
t/porting/diag.t

index 0a81b29..cd09098 100644 (file)
@@ -142,6 +142,8 @@ my %specialformats = (IVdf => 'd',
                      NVef => 'f',
                      NVff => 'f',
                      NVgf => 'f',
+                     SVf256=>'s',
+                     SVf32=> 's',
                      SVf  => 's');
 my $format_modifiers = qr/ [#0\ +-]*              # optional flags
                          (?: [1-9][0-9]* | \* )? # optional field width
@@ -149,7 +151,8 @@ my $format_modifiers = qr/ [#0\ +-]*              # optional flags
                          (?: h|l )?              # optional length modifier
                        /x;
 
-my $specialformats = join '|', sort keys %specialformats;
+my $specialformats =
+ join '|', sort { length $b cmp length $a } keys %specialformats;
 my $specialformats_re = qr/%$format_modifiers"\s*($specialformats)(\s*")?/;
 
 # Recursively descend looking for source files.