Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Forks.pm dilemma

by Kageneko (Scribe)
on Aug 07, 2003 at 18:14 UTC ( #281983=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Forks.pm dilemma
in thread Forks.pm dilemma

That's exactly what I meant ;) I wonder if the xsubpp maintainer (is there one?) can be convinced to allow a pre-processing option, similar to 'perl -P'.


Comment on Re: Re: Re: Forks.pm dilemma
Re: Re: Re: Re: Forks.pm dilemma
by Kageneko (Scribe) on Aug 08, 2003 at 18:20 UTC
    Here is a patch which adds preliminary pre-processor support to xsubpp. There's a few caveats. #line will now be incorrect, since the #includes now occur BEFORE xsubpp gets to them (I wonder if there's a way to disable those directives). As soon as I get better testing done, I'll send this in to whoever is supposed to see it. To invoke, use xsubpp -preprocess blah
    *** xsubpp.old Fri Aug 8 13:18:20 2003 --- xsubpp Fri Aug 8 13:13:23 2003 *************** *** 164,169 **** --- 164,170 ---- $process_inout = 1, next SWITCH if $flag eq 'inout'; $process_argtypes = 0, next SWITCH if $flag eq 'noargtype +s'; $process_argtypes = 1, next SWITCH if $flag eq 'argtypes' +; + $preprocess = 1, next SWITCH if $flag eq 'preprocess'; (print "xsubpp version $XSUBPP_version\n"), exit if $flag eq 'v'; die $usage; *************** *** 883,889 **** $text; } ! open($FH, $filename) or die "cannot open $filename: $!\n"; # Identify the version of xsubpp used print <<EOM ; --- 884,895 ---- $text; } ! if ( $preprocess ) { ! open($FH, "$Config{cpp} $filename |") ! or die "cannot open $Config{cpp} $filename: $!\n"; ! } else { ! open($FH, $filename) or die "cannot open $filename: $!\n"; ! }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://281983]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (18)
As of 2014-04-16 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (432 votes), past polls