On Sat, 18 Sep 2004, Jonadab the Unsightly One wrote: > James Mastros <[EMAIL PROTECTED]> writes: > > > As a special case, if the "filename" argument to perl is a > > directory, and the directory contains a file named "main.pl", > > then the directory is prepended to @*INC, and main.pl is run. > > I think it would be useful if the "directory" could also be an archive > in certain common and widely-supported formats (gzipped tarball and > PKWare ZIP being the most important ones to support IMO; probably > should go for bzip2ed tarball also and maybe disk images containing > ISO filesystems if a suitably unencumbered extant code library can be > found for reading them).
The question is whether any of that needs to be core, and I'm starting to strongly think it doesn't. I was about to say that perl should only go trying to figure out that the file is an archive if you pass it an appropriate command-line argument, but then I realized that argument could well be -MPAR (or such). Then the module would have to do some magic to see how it's being called and analyze the parameters, look for archives, etc, but the perl executable itself wouldn't need anything special (which feels a lot nicer, since presumably updating the PAR module installed would be a lot easier than updating perl to support a new archive type). -MPAR could also handle the directory case, removing any special casing whatsoever from perl. -- Adam Lopresto http://cec.wustl.edu/~adam/ "Just once, I wish we would encounter an alien menace that wasn't immune to bullets." --The Brigadier, "Dr. Who"