Re: [perl #32498] h2xs generates incorrect code for Makefile.PL for enums
Noah [Wed, 19 Jan 2005 12:33:52 +0000 (07:33 -0500)]
Message-ID: <20050119173352.GA15592@radu.onastick.net>

p4raw-id: //depot/perl@23822

utils/h2xs.PL

index b973705..bb4f537 100644 (file)
@@ -903,7 +903,7 @@ if( @path_h ){
             for my $item (split /,/, $enum_body) {
                 my ($key, $declared_val) = $item =~ /(\w+)\s*(?:=\s*(.*))?/;
                 $val = defined($declared_val) && length($declared_val) ? $declared_val : 1 + $val;
-                $seen_define{$key} = $declared_val;
+                $seen_define{$key} = $val;
                 $const_names{$key}++;
             }
         } # while (...)