summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Q. Linux <jql@jql.accessone.com>1997-04-12 15:01:33 -0700
committerChip Salzenberg <chip@atlantic.net>1997-04-15 00:00:00 +1200
commit683d4eee6f3b749aec29cc849f45404c6acda85e (patch)
treeed2d32c1b30e539a2714b0d484f1f1da5f05ef5d
parent248e2feabe92562dd8355cfd55ca72d937481761 (diff)
downloadperl-683d4eee6f3b749aec29cc849f45404c6acda85e.tar.gz
xsubpp incorrectly handles 'class::newthing()'
private-msgid: 199704122201.PAA01780@jql.accessone.com
-rwxr-xr-xlib/ExtUtils/xsubpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp
index 0cc8d785a7..aa46b28238 100755
--- a/lib/ExtUtils/xsubpp
+++ b/lib/ExtUtils/xsubpp
@@ -821,7 +821,8 @@ while (fetch_para()) {
@args = split(/\s*,\s*/, $orig_args);
if (defined($class)) {
- my $arg0 = ((defined($static) or $func_name =~ /^new/) ? "CLASS" : "THIS");
+ my $arg0 = ((defined($static) or $func_name eq 'new')
+ ? "CLASS" : "THIS");
unshift(@args, $arg0);
($orig_args = "$arg0, $orig_args") =~ s/^$arg0, $/$arg0/;
}
@@ -928,7 +929,7 @@ EOF
EOF
if (!$thisdone && defined($class)) {
- if (defined($static) or $func_name =~ /^new/) {
+ if (defined($static) or $func_name eq 'new') {
print "\tchar *";
$var_types{"CLASS"} = "char *";
&generate_init("char *", 1, "CLASS");
@@ -973,13 +974,13 @@ EOF
$wantRETVAL = 1;
}
if (defined($static)) {
- if ($func_name =~ /^new/) {
+ if ($func_name eq 'new') {
$func_name = "$class";
} else {
print "${class}::";
}
} elsif (defined($class)) {
- if ($func_name =~ /^new/) {
+ if ($func_name eq 'new') {
$func_name .= " $class";
} else {
print "THIS->";