1 # Do not remove the following line; MakeMaker relies on it to identify
2 # this file as a template for defsubs.h
3 # Extracting defsubs.h (with variable substitutions)
6 my (undef, $headerpath) = @ARGV;
7 my ($out) = __FILE__ =~ /(^.*)\.PL/i;
9 unlink $out if -l $out;
10 open(OUT,">$out") || die "Cannot open $file:$!";
11 print "Extracting $out...\n";
14 !!! Don't modify this file - it's autogenerated from $0 !!!
18 foreach my $const (qw(
57 # This is only present in 5.10, but it's useful to B::Deparse to be able
58 # to import a dummy value from B
59 doconst(OPpPAD_STATE);
63 # Constant not present in 5.8.x
66 # Constant not present after 5.8.x
70 foreach my $tuple (['op.h'],['cop.h'],['regexp.h','RXf_'])
72 my $file = $tuple->[0];
73 my $pfx = $tuple->[1] || '';
74 my $path = File::Spec->catfile($headerpath, $file);
75 open(OPH,"$path") || die "Cannot open $path:$!";
78 doconst($1) if (/#define\s+($pfx\w+)\s+([\(\)\|\dx]+)\s*(?:$|\/\*)/);
89 newCONSTSUB(stash,"$sym",newSViv($sym));
90 av_push(export_ok,newSVpvn("$sym",$l));