> 1) Create a module with Inline.
> 2) Test it using the normal/local _Inline/ cache.
> 3) Create a Makefile.PL (like the one produced by h2xs)
> 4) Change 'use ExtUtils::MakeMaker' to 'use Inline::MakeMaker'
> 5) Change your 'use Inline C => DATA' to 'use Inline C => DATA => NAME
> => Foo => VERSION => 1.23'
> 6) Make sure NAME matches your package name ('Foo'), or begins with
> 'Foo::'.
> 7) Make sure VERSION matches $Foo::VERSION. This must be a string (not a
> number) matching /^\d\.\d\d$/
> 8) Do the perl/make/test/install dance (thanks binkley :)
>
Hi Brian,
Thanks for the info on 'permanent' installs. My (admittedly unusual)
module still makes the install stuff unhappy. 'make' chokes with the
following:
[khk: XML]# make
...(SNIP)...
/usr/bin/perl -Mblib -MInline=_INSTALL_ -MXML::Comma -e1 0.20
Using /u/khkramer/src/perl/XML-Comma/XML/blib
Error while defining bootstrap definition: Undefined subroutine
&XML::Comma::Parsing::SimpleC::_c_new called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma/Parsing/SimpleC.pm line 37.
XML::Comma::Bootstrap::new('XML::Comma::Bootstrap', 'block',
'<DocumentDefinition>^J <name>DocumentDefinition</name>^J^J <eleme...') called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma/DefManager.pm line 88
require XML/Comma/DefManager.pm called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma.pm line 86
XML::Comma::BEGIN() called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma/DefManager.pm line 0
eval {...} called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma/DefManager.pm line 0
require XML/Comma.pm called at -e line 0
main::BEGIN() called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma/DefManager.pm line 0
eval {...} called at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma/DefManager.pm line 0
BEGIN failed--compilation aborted at
/u/khkramer/src/perl/XML-Comma/XML/blib/lib/XML/Comma.pm line 86.
BEGIN failed--compilation aborted.
make: *** [blib/arch/auto/XML/Comma/.inline] Error 255
----
The problem is that doing -MXML::Comma triggers my BEGIN-block stuff,
parts of which are trying to load and use Inline code to parse config
files and the like. So it looks like a chicken-and-egg situation.
My use command is the following:
eval 'use Inline C => $code
=> NAME => "XML::Comma::Parsing::SimpleC"
=> VERSION => "0.20"';
Is there a way to craft a 'use' that is happy in both 'permanent'
install and ad-hoc run contexts? When I try to just run code that uses
this module (without the permanent install having been done), I get
the "you need to remove the version" error:
To allow Inline to compile the module in a temporary cache, simply
remove the Inline config option 'VERSION=' from the
XML::Comma::Parsing::SimpleC module. at (eval 2) line 1
Thanks,
Kwin