[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Finding old library directories (was Re: automatic perl module rpm wrapper)



In message <199912172025.MAA14839@activestate.com>
          Gurusamy Sarathy <gsar@ActiveState.com> wrote:

> On Fri, 17 Dec 1999 14:19:05 EST, Andy Dougherty wrote:

> >First, lib.pm and perl.c:incpush() do have to somehow generate that list
> >of N versions since they can't possibly know in advance which of those N
> >potentially valid directories will be present in

> >	use lib '/my/private/lib';

> >and

> >	perl -I/my/private/lib

> >Generating that list ought to be quick, whether done as a loop
> >C<while ($version-- >= PERL_XS_APIVERSION)> or as a look-up table.
> >[Hmm.  A look-up table would allow us to put holes in the sequence and
> >hop over stretches of development versions, so it might be better.  I had
> >never thought about it before.]

> I was basically just saying that the lookup table should be in
> config.sh (and thence Config.pm and config.h for use in lib.pm and
> incpush()).

The question is how does it get into config.sh - is it hardwired
somewhere or does Configure attempt to generate the list automatically
from the current version number and the definition of {xs,pm}_apiversion?

If we want to include only those versions which ever actually existed
then it will probably have to be hardwired won't it? which adds an
extra maintenance task for the pumpkings each time they do a release.

> >I'm not sure if that means we have to stat() all those directories,
> >however.
>
> I can't see a way around stat()ing them.

I don't think that's a problem - at least on my linux box here
stating 60 or so subdirectories of the perl library directory
takes a virtually unmeasurable amount of time, and that was done
at the perl level not the C level. I suspect it might be rather
slower on Windows though.

Tom

-- 
Tom Hughes (tom@compton.nu)
http://www.compton.nu/
...Are we THERE yet?


Follow-Ups from:
Gurusamy Sarathy <gsar@activestate.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]