Ken Williams wrote:
Hi Roman,

I was hoping someone else would jump in with more information than I have, but it looks like nobody else has. As far as I'm aware, there's no analog of Inline::MakeMaker for M::B, but it would certainly be nice to have.

(Sorry, I've been hiding again...)

I have taken a brief look[1,2], but I'm not an Inline user either. However, it looks fairly simple. It boils down to a few ops:

1) Silently insert a dependency on Inline

2) Add Inline's temp build directory to the cleanup

3) Run the Inline filter on the main module file (this seems an unnecessary limitation; why not more than one Inline file?). In MakeMaker the rule used is:

.pm.inl:
\$(PERL) -Mblib -MInline=NOISY,_INSTALL_ -M$name -e1 $version \$(INST_ARCHLIB)


Inline itself checks to see if it is necessary to rebuild, so it's just an unconditional execution of the filter.

Not sure about the interface though. Is there a reason for the limitation mentioned above. If so, we just run the filter on dist_name. Otherwise, we could allow multiple modules to be specified:

 my $builder = Module::Build->new(
   ...
   inline => [ 'lib/Foo.pm', 'lib/Bar.pm' ],
 );

Randy.


1) <http://search.cpan.org/src/INGY/Inline-0.44/lib/Inline/MakeMaker.pm>
2) <http://search.cpan.org/~ingy/Inline-0.44/Inline.pod#Writing_Modules_with_Inline>

Reply via email to