develooper Front page | perl.perl5.porters | Postings from May 2003

Re: windows, shortcuts and 'use lib'

Thread Previous | Thread Next
From:
Edward Peschko
Date:
May 8, 2003 01:53
Subject:
Re: windows, shortcuts and 'use lib'
Message ID:
20030507155255.A9785@mdssirds.comp.pge.com
> >ok, that's what I want to know... *where* are the conversions done?
> 
> Several places but I would expect main command-line hackery 
> to be in "hidden" in win32/win32.c
> 
> >I renamed this thread to 'shortcuts for core',
> 
> Not in the Subject: line ...

I did once.. the post didn't seem to get to perl5-porters though.

> >Anyways, I'd be happy to make this a module, except that there's no good way
> >that I can see to override `` 
> 
> You _may_ have a point there.

good, perhaps the hook could be put in...

> >and @INC, 
> 
> You can add objects and/or coderefs to @INC which can so this.

hmm.

It'd be nicer to have a way to take the argument to @INC and automatically pass it 
through a filter of some sort before it is added to @INC. That way I don't have to worry 
about modules that say:

push(@INC, "shortcut");

I suppose that I could make this filter by putting a subref on the front of @INC, which
then translates the rest of @INC at the point of 'use' or 'require'. Seems pretty 
wasteful though, since the translation will happen every single time a 'use' or 'require'
occurs.

> >and %INC 
> 
> %INC keys are _ALWAYS_  in Foo/Bar style - regardless of OS/File system.

true, true..

> (as well as saying 'perl script.p' where script.p.lnk is a shortcut). 

How about this one? I don't see how this could possibly be part of a module..

Ed

> Changes to the core for just this are unlikely.
> Changes to the core to enable a module to override things to enable this are 
> more likely.

(
ps - I can see this from past and current experience, but why? 
Shortcuts on win32 are just as ubiquitous as symlinks on unix. yes, symlinks are more 
tightly integrated on unix, yes they are simpler to use, but I thought that the overriding
goal for perl was to adapt to the OS that it runs on..
)

(pps - any changes that would do this are eventually going to have to happen. I just read
up on longhorn, and it looks like they are getting rid of the traditional text based 
file system altogether:

http://www.pcworld.com/news/article/0,aid,110615,00.asp

welcome to winFS, where every data path is actually a SQL statement in disguise...
)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About