Re: build inline program with pp

[email protected] ("Sisyphus")
Newsgroups perl.inline
Message-ID <A1FE136F942F4590BF754C213332F6E2@desktop2>
----- Original Message ----- 
From: "David Oswald" <[email protected]>
To: <[email protected]>; "Sisyphus" <[email protected]>
Sent: Friday, April 20, 2012 2:15 PM
Subject: Re: build inline program with pp


> On Thu, Apr 19, 2012 at 7:37 PM, Sisyphus <[email protected]> 
> wrote:
>>
>> ----- Original Message ----- From: "Xiao Yafeng" <[email protected]>
>
>> c2xs --m=XYZ --write_makefile_pl=1 --inc=-I/here -I/there --write_pm=1
>> would equate to:
>> c2xs('XYZ', 'XYZ', '.', {WRITE_MAKEFILE_PL=>1, INC=>'-I/here -I/there',
>> WRITE_PM=>1});
>>
>> Would that be ok ? If not, let me know - I don't have any definite rules
>> about this. (Error checking would be built in, of course.)
>
> ...while you're at it... (I'm sure you know what will come next):
> InlineX::CPP2XS would benefit from similar treatment.

Yes, I'll duplicate it there.

> Would it make sense for the command-line version to exist within the
> App:: namespace?  App::InlineX::CPP2XS, for example.

All I was going to do was have, as part of InlineX::C2XS, a perl script 
named 'c2xs' (converted by pl2bat.bat to 'c2xs.bat' for Windows).
It would just check and parse the commandline arguments then, based on those 
arguments, make the appropriate call to InlineX::C2XS::c2xs().

Just like h2xs/h2xs.bat, perldoc/perldoc.bat, html2pod/html2pod.bat, etc., 
c2xs/c2xs.bat would be installed into perl/bin (when 'make install' is run 
for InlineX::C2XS).

I don't know exactly how to implement that yet but other modules do similar 
things - eg PDL has perldl/perldl.bat. I should be able to work out how this 
is achieved by studying the way that PDL goes about it.

Cheers,
Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.