Re: What Requires Core Support (app packaging)Z
On Sat, 25 Sep 2004, Jonadab the Unsightly One wrote: to @INC, which implies that @INC needs to be able to contain more than just directories on the system-level filesystem -- it needs to be able to contain tied "directories" that are simulated by modules, or (Unless I've not really understood what you mean) this should not be a major problem since @INC already, i.e. in (recent) Perl5(s) can contain "more than just directories", e.g. coderefs. HTH, Michele -- Ask about it in alt.folklore.computers. Somebody over there will know; they know everything or know somebody who does ;-). - Found somewhere in USENET
Re: What Requires Core Support (app packaging)Z
"Adam D. Lopresto" <[EMAIL PROTECTED]> writes: > On Sat, 18 Sep 2004, Jonadab the Unsightly One wrote: > > 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). If by "core" you mean language core, and if the module in question would be in the core distribution, then I can mostly go along with that (with one caveat, below). And on some platforms the Perl installer could associate certain extensions (perhaps .par) with "perl -MPAR" or whatever so that launching the thing Just Works. Since most of the point of such a mechanism would be to allow people who "just" have Perl installed to automagically run these programs-in-an-archive that include all the modules they use in their nice neat package, it would be unfortunate to require something extra to be installed to make that work. Thus, this module should go in the core distribution, along with the new and improved CPAN.pm equivalent. So in one sense I would consider this "core functionality", in the sense that it's something Perl needs to be able to do out of the box, but I can agree that it doesn't need to be in the _language_ core. Except that the module will be prepending the contents of the archive to @INC, which implies that @INC needs to be able to contain more than just directories on the system-level filesystem -- it needs to be able to contain tied "directories" that are simulated by modules, or something along those lines. The core might have to have some hooks for that. -- $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,"[EMAIL PROTECTED]/ --";$\=$ ;-> ();print$/
Re: What Requires Core Support (app packaging)Z
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"