From: Nicholas Clark Date: Thu, 13 Jan 2005 21:54:21 +0000 (+0000) Subject: Avoid dogfood problems when an empty string accidentally ends up X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b8e6adcbf4d1bbd9b9f3e01a29355dc0a3763a4a;p=p5sagit%2Fp5-mst-13.2.git Avoid dogfood problems when an empty string accidentally ends up as a constant name. [They don't work in qw(), strangely] p4raw-id: //depot/perl@23792 --- diff --git a/lib/ExtUtils/Constant.pm b/lib/ExtUtils/Constant.pm index ab18c72..1bd8717 100644 --- a/lib/ExtUtils/Constant.pm +++ b/lib/ExtUtils/Constant.pm @@ -1,6 +1,6 @@ package ExtUtils::Constant; use vars qw (@ISA $VERSION %XS_Constant %XS_TypeSet @EXPORT_OK %EXPORT_TAGS); -$VERSION = 0.14_01; +$VERSION = 0.15; =head1 NAME @@ -286,7 +286,8 @@ sub memEQ_clause { my $len = length $name; if ($len < 2) { - return $indent . "{\n" if (defined $checked_at and $checked_at == 0); + return $indent . "{\n" + if (defined $checked_at and $checked_at == 0) or $len == 0; # We didn't switch, drop through to the code for the 2 character string $checked_at = 1; } @@ -683,6 +684,7 @@ sub dump_names { $used_types{$type}++; if ($type eq $default_type # grr 5.6.1 + and length $_->{name} and length $_->{name} == ($_->{name} =~ tr/A-Za-z0-9_//) and !defined ($_->{macro}) and !defined ($_->{value}) and !defined ($_->{default}) and !defined ($_->{pre})