# Do not remove the following line; MakeMaker relies on it to identify # this file as a template for defsubs.h # Extracting defsubs.h (with variable substitutions) #!perl -w use File::Spec; my (undef, $headerpath) = @ARGV; my ($out) = __FILE__ =~ /(^.*)\.PL/i; $out =~ s/_h$/.h/; open(OUT,">$out") || die "Cannot open $file:$!"; print "Extracting $out...\n"; print OUT <<"END"; /* !!! Don't modify this file - it's autogenerated from $0 !!! */ END foreach my $const (qw( DEBUG_p_FLAG DEBUG_s_FLAG DEBUG_l_FLAG DEBUG_t_FLAG DEBUG_o_FLAG DEBUG_c_FLAG DEBUG_P_FLAG DEBUG_m_FLAG DEBUG_f_FLAG DEBUG_r_FLAG DEBUG_x_FLAG DEBUG_u_FLAG DEBUG_H_FLAG DEBUG_X_FLAG DEBUG_D_FLAG DEBUG_S_FLAG DEBUG_T_FLAG DEBUG_R_FLAG DEBUG_J_FLAG DEBUG_v_FLAG )) { doconst($const); } close(OUT); sub doconst { my $sym = shift; my $l = length($sym); print OUT <<"END"; newCONSTSUB(stash,"$sym",newSViv($sym)); av_push(export_ok,newSVpvn("$sym",$l)); END }