----- Original Message -----
From: "Miles Gould" <[EMAIL PROTECTED]>
To: <inline@perl.org>
Sent: Friday, November 07, 2008 9:32 PM
Subject: Re: Changing the name of the default Inline working directory
On Fri, Nov 07, 2008 at 02:43:54PM +1100, Sisyphus wrote:
With 2 extra lines of code in Inline.pm, we can get Inline to check the
existing entries for perl version and archname that are already in the
.inl
file. If they don't match, then Inline leaves the existing build (say
'test_pl_abcd') in place and re-builds in 'test_pl_abcdefgh'. If a third
config/version crops up, Inline then builds a third version in
'test_pl_abcdefghijklmnop', and for a fourth config/version
'test_pl_abcdefghijklmnopqrstuvwxyz123456' is used.
Not quite sure if I follow - are you proposing to use those actual
names, or are they metasyntactic variables?
No - it won't be those actual names.
The 'abcdef.....' section will be replaced with the md5 digest (or relevant
part thereof) that Inline has calculated for that specific Inline file.
This behaviour already exists in Inline-0.44, though it's not usually
triggered. If you want to see exactly what happens, run a simple test script
(say 'try_pl'). You can then go to the _Inline/lib/auto/try_pl_**** folder,
open up the .inl file contained therein, and alter the md5 digest entry at
the top of the file. This will cause a re-compilation of try.pl next time
you run it - and the re-compiled files will be placed in a newly created
_Inline/lib/auto/try_pl_******** folder. Mess up the md5 digest in that new
.inl file, and the next time you run the script, you'll find the files in
_Inline/lib/auto/try_pl_***************, etc.
If, at any stage, any one of those .inl files contains the correct md5
digest for that script, then that compilation will be used.
With Inline-0.44, it's only the MD5 digest and Inline.pm version entries in
the .inl file, that gets checked. My thinking is that, with 0.45, we simply
have the archname and perl version checked as well. I guess we may be able
to shorten the names of those 4 directories and files to 'script_pl_****',
'script_pl_*****', 'script_pl_******', and script_pl_********' - ie use the
first 4, 5, 6 and 7 characters of the MD5 digest, as opposed to the current
behaviour of 4,8,16 and 32 characters. I'll have to take a look at that ...
at the moment I don't know what's involved.
Keep in mind that one can avoid this feature altogether (and still have
multiple compilations of the one script) by setting the default inline
directory to something like "_Inline/$Config{archname}/$]".
If the former, can I request
something a little less opaque, and less inclined to cause problems on
architectures with limits on filename length? :-)
How small a limit are we looking at ? Are there situations where files like
'script_pl_2f03a1cb102f1314deafda5f929b44e3.inl' would be disallowed ? If
so, then I guess now (rather than later) is the time to address that issue.
Thanks for raising this.
Cheers,
Rob