?b 五, 2004-01-23 19:55, Barrie Slaymaker ?g?D?G > What is the advantage of using the CODE refs in @INC?
It makes it easier for people to dynamically add PAR files to @INC, which is why PAR exists in the first place. > Is there a disadvantage to just unzipping the packaged files in to a > temp dir and putting the appropriate entry in to @INC? I do not think those two approach needs to be mutually exclusive. Actually, I think what we need is, instead of the current scheme of creating a temp file for, say, IO::File in file1.par and DBI in file2.par: $PAR_TEMP/abcd0123.pm $PAR_TEMP/bcde5432.pm We ought to use: $PAR_TEMP/file1%2Epar/IO/File.pm $PAR_TEMP/file2%2Epar/DBI.pm and assign the two subdirectories to @INC, directly before our coderef hook. Of course, $INC{'IO/File.pm'} will be a physical file instead of a code reference. Also -- I dislike needless pre-extraction. It penalize people using many PAR files, some of which may be remote. I can see that files other than .pm and .dll needs to be pre-extracted, though. Would be good enough for you? > Also, I believe the current practice of extracting files to filenames > based on the CRC32 of the file's contents leaves some chance that two > files will have the same CRC and thus end up extracting to the same > filename. The risk is acknowledged. I'd love to hear comments form you and other folks about the new scheme outlined above. > I'd love to implement a PAR.pm patch for this, but I can't seem to get > pp to bundle the XS code for installed modules into a pp -p -B version > of VCP and I don't have VS.net here to compile parl.exe myuself. Maybe > I can figure out how to unpack and repack parl.exe and insert my own > .exe. Parl.exe needs only VC6 -- at least, that's what I'm using. :-) Thanks, /Autrijus/
pgp00000.pgp
Description: PGP signature