Inline 0.40 TRIAL1 is available for testing.
You can download it from here:
http://www.ttul.org/~ingy/Inline-0.40-TRIAL1.tar.gz
---
This is the one you've been waiting for!
Inline 0.40 creates extensions that are nearly indistinguishable from
XS, but with all the ease you've come to expect from Inline. Now you can
write modules with Inline and upload them to CPAN without worry. But
more about that later...
This code is hot of the press. I just fixed a bug 3 minutes ago. This
release *has* bugs. I can guarantee it. That's why it's a TRIAL1. I
expect this release will take a couple weeks to cool off. Once it is
stable, I'll move it to CPAN. But in the mean time I need your help.
Please put Inline through its paces with your existing code base. Try to
break it early and break it often. Try not only good code but code with
errors. Try compiling, changing, and recompiling. Try the new options.
And please report any peculiar behaviour.
This mailing list is usually pretty silent, and that's fine by me. But
now is a good time to make some noise. Feel free to post away. Don't
assume someone else will report the bugs. I've got all my staff on alert
to handle your Inline needs. Fire away.
(ingy is slightly sleep deprived. please take all he says with a
pinch...)
---
I haven't touched the doc yet, so let me give you the basics:
The big change is that the md5 keys have been moved out of the object
names and into '.inl' files. This makes things a lot nicer to deal with.
But it also calls for a few new rules.
I've added 3 new config options to support this:
NAME - an explicit name for your extension object
VERSION - a version number for your object
AUTONAME - whether or not Inline use part of the md5 in your name
Rule 1) You don't need to specify any of these. They are all optional.
Rule 2) If you don't specify NAME, Inline will make up an object name
for you. This is similar to previous behaviour except that it just uses
your script name or your package name. No md5 or language code.
Rule 3) If you don't specify NAME, AUTONAME is assumed (unless you
explicitly DISABLE it). AUTONAME adds a small piece of the md5 key onto
the end of your name. It starts with 4 hex chars and doubles (an
extremely rare occurence) until uniqueness is found. A one liner (like
the signature of this email) would produce: _e_274b.so and _e_274b.inl.
Rule 4) When NAME *is* used, the value given becomes your object's name.
NAME=speedy produces speedy.so and speedy.inl. The .inl always sits next
to the .so (or .dll). It contains lots of information about the object.
The informational bits are all used to make sure the object is the
correct one.
Rule 5) AUTONAMEd objects *never* overwrite an older version. They
merely change names. This is just like the old way Inline worked (except
the names are considerably shorter). Non-AUTONAMEd objects, *always*
replace their older versions. In other words you don't build up a lot of
useless old artifact objects sitting around in your cache directory. The
other side of that coin is that you must ensure name module uniqueness
yourself.
Rule 6) When producing an installable module (possibly for CPAN) you are
*required* to give the object a NAME and a VERSION.
Rule 7) In the case of Rule 6, the NAME must be the same as the module's
pacakage name, or an extension of it. (The extended part must begin with
'::'). The version must match the module's $VERSION (which is also
required).
Rule 8) For other uses, VERSION is not allowed. You cannot compile an
Inline extension into a .Inline/ cache directory, with the VERSION
option in use. This is what separates installed modules from temporarily
built ones.
---
There is a new module called Inline::MakeMaker. All you need to do to
make an Inline module installable is write a standard Makefile.PL for
it. But replace ExtUtils::MakeMaker with Inline::MakeMaker. That's it!
Of course, you need to do all the other things that good module authors
do. Write lots of doc, write lots of tests, test like hell, and test
some more.
I have included a directory called 'modules/Math/Simple' that contains
all the components of a fully operational extension module. Feel free to
play with it. It's only a few lines of code. To make in into a
distribution type:
cd modules/Math/Simple
make dist
---
One last thing. This version of Inline will *NOT* work with any other
Inline modules on CPAN. Please do not even consider installing this on
your production installations.
(Patrick, Neil, Ryan: You'll need to adjust your modules accordingly.
Feel free to bug me)
OK its off to bed for ingy.
Cheers, Brian
--
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker",x);}};print JAxH+Perl'