h2xs doesn't recognize indented enums
Tassilo von Parseval [Fri, 21 May 2004 10:51:58 +0000 (12:51 +0200)]
Message-id: <20040521085158.GA10660@ethan>
(modified regexp)

p4raw-id: //depot/perl@22836

utils/h2xs.PL

index 2e8e23e..9132bc9 100644 (file)
@@ -900,7 +900,7 @@ if( @path_h ){
             next if $opt_e && $enum_name =~ /$opt_e/;
             my $val = 0;
             for my $item (split /,/, $enum_body) {
-                my ($key, $declared_val) = $item =~ /(\w*)\s*=\s*(.*)/;
+                my ($key, $declared_val) = $item =~ /(\w+)\s*=\s*(.*)/;
                 $val = length($declared_val) ? $declared_val : 1 + $val;
                 $seen_define{$key} = $declared_val;
                 $const_names{$key}++;