From: John Q. Linux Date: Sat, 12 Apr 1997 22:01:33 +0000 (-0700) Subject: xsubpp incorrectly handles 'class::newthing()' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=683d4eee6f3b749aec29cc849f45404c6acda85e;p=p5sagit%2Fp5-mst-13.2.git xsubpp incorrectly handles 'class::newthing()' private-msgid: 199704122201.PAA01780@jql.accessone.com --- diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 0cc8d78..aa46b28 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->";