The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
|
chdir (dirname($0));
my $file = "typemap" ;
unlink $file if -f $file ;
my $fh = new IO::File "> $file" or die "Can't create $file: $!" ;
my $pl5_8_0 = eval { require 5.008000; 1; };
print $fh "Text::CPP T_PTROBJ\n" ;
unless ( $pl5_8_0 ) {
print $fh <<'EOT';
const char * T_PV
########################################################
INPUT
T_HVREF
if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
$var = (HV*)SvRV($arg);
else
croak(\"$var is not a hash reference\")
EOT
}
$fh -> close ;
chmod 0644, $file ;
|