summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-13 21:54:21 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-13 21:54:21 +0000
commitb8e6adcbf4d1bbd9b9f3e01a29355dc0a3763a4a (patch)
treed38c841a6b2cb60755a9a72cae5eec84189f948f
parentc4c5f44ab99b928971472cc4b5376b9230e528f1 (diff)
downloadperl-b8e6adcbf4d1bbd9b9f3e01a29355dc0a3763a4a.tar.gz
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
-rw-r--r--lib/ExtUtils/Constant.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ExtUtils/Constant.pm b/lib/ExtUtils/Constant.pm
index ab18c72ddc..1bd87177f4 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})