Hi,
sorry for being a little bit late, but you know ... :-)
On Tue, Jan 09 2001, Brian Ingerson wrote:
> Hi all,
>
> I just wanted to run some ideas by the people on this mailing list.
[snipped]
> Much success has already been achieved towards the first objective.
> Inline lets you write C extensions as simple as Perl one-liners, or as
> complex as inlined yacc grammars :)
I agree completely :-) Now it's really fun to write a C extension.
> Version 0.30 went a long ways towards accomplishing the second
[snipped]
>
> 2) The second problem is a little stickier and is the real subject of
> this tome :) I think that the MD5 keys (the long hex numbers) that are
> currently mangled in the shared object names, should be removed and
> placed elsewhere. This would allow a script called 'beebop.pl' to have a
> shared object called 'beebop.so' instead of
> 'main_C_beebop_pl_6e7142e1724ddd37c76e8d76925ff60a.so' and it would be
> installed as './blib_I/lib/auto/beebop/beebop.so' instead of
> './blib_I/lib/perl5/site_perl/5.005/i586-linux/auto/main_C_beebop_pl_...'
> My idea is to put all the extra verification information in a sister
> file called './blib_I/lib/auto/beebop/beebop.inline'.
I think, this is a very good idea. It would make it much easier and
less error prone to maintain library informations manually.
> To address the finer points of the issue, I'll describe the current
[snipped]
>
> I would like to propose a new implementation. It is not without problems
> and obstacles. But I think it is in the spirit of Inline and Perl: It
> makes easy things easier and hard things still possible.
>
> Here is a list of the ideas:
>
> 1) Shorten the shared object name to one of the following forms:
> A) Script name if the package is 'main'. ragtime.pl => ragtime.so
> (drop .xxx extensions like .pl and .cgi)
> B) Package name if not 'main'. Jazz::Swing => Jazz/Swing.so
> C) 'e' plus first few chars of MD5 if script is a command line form.
> -e => e_2cf5.dll (use AUTONAME feature below)
> D) Use a user specified name as a config option.
> OBJ_NAME=Soul => Soul.so
I think this is a good point. It makes it more transparently for the
application users of extension modules where these mystical shared
libraries belong to.
> 2) Put all of the other info that used to be in the name (including MD5)
> into a sister '.inline' file. Check that file at load time to see if a
> compile is needed. Jazz/Swing.pm => Jazz/Swing.so => Jazz/Swing.inline
> 3) Require the user to specify an object name if more than one Inline
> section is used in the same file.
> 4) Provide an AUTONAME feature if user doesn't want to make up the names
> of multiple extensions. Names would use as much of the MD5 key needed to
> make them unique. Foo.pl => Foo.33e4.so, Foo.49.so, Foo.33e0.so. These
> have a disadvantage of not being replaced/removed on recompile.
This is always the prize you have to pay if you get files created
automatically.
> 5) Don't allow AUTONAME for extension modules. Thus ensuring that older
> versions get replaced.
Very good idea.
> I guess that's about it. Maybe not as painful as I thought. Am I missing
> anything here.
Not that I am aware of :-)
Cheers,
Norbert
--