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)
5 my ($out) = __FILE__ =~ /(^.*)\.PL/i;
7 unlink $out if -l $out;
8 open(OUT,">$out") || die "Cannot open $file:$!";
9 print "Extracting $out...\n";
12 !!! Don't modify this file - it's autogenerated from $0 !!!
16 foreach my $const (qw(
56 # This is only present in 5.10, but it's useful to B::Deparse to be able
57 # to import a dummy value from B
58 doconst(OPpPAD_STATE);
62 # Constant not present in 5.8.x
65 # Constant not present after 5.8.x
69 foreach my $tuple (['op.h'],['cop.h'],['regexp.h','RXf_'])
71 my $file = $tuple->[0];
72 my $pfx = $tuple->[1] || '';
73 my $path = $^O eq 'MacOS' ? ":::$file" : "../../$file";
74 open(OPH,"$path") || die "Cannot open $path:$!";
77 doconst($1) if (/#define\s+($pfx\w+)\s+([\(\)\|\dx]+)\s*(?:$|\/\*)/);
88 newCONSTSUB(stash,"$sym",newSViv($sym));
89 av_push(export_ok,newSVpvn("$sym",$l));