Çäðàâñòâóéòå Sisyphus,

Thursday, July 07, 2005, 3:58:43 PM, Âû íàïèñàëè:


S> ----- Original Message ----- 
S> From: "Ñåðãåé ×åðíèåíêî" <[EMAIL PROTECTED]>

>>  But path separator (slash or backclash) as first symbol
>> of path in require produces an error on win98 and perl5.8.6 b811 of
>> mine:
>>  Can't locate \includes\28ESP.pl in @INC (@INC contains: C:/Perl/lib
>>  C:/Perl/site/lib .)
>>

S> I won't believe that until it's proven to me :-)

S> First up, which drive contains \includes\28ESP.pl ?

   it is d:\perl_projects\ The file 28esp.pl contains only string "1;"

S> Run this script:

S> use warnings;
S> use Cwd;
S> print getcwd(), "\n";
S> require '\\includes\\28ESP.pl';
S> __END__

   Output is:
   
Can't locate \includes\28ESP.pl in @INC (@INC contains: 
C:/.ActiveState/GUI_Builder
C:/Perl/lib C:/Perl/site/lib .) at D:\perl_projects\pw_form.pl line 4.
D:/perl_projects

   Not so amazing. Single quotes is not interpreted in perl. And no
   doubt that nobody expect to find directory named '\\includes'.
   Only 'includes'.

S> If that prints a cwd that begins with the same drive letter that houses
S> \includes\28ESP.pl && it also produces the error you're claiming it does
S> .... then (and only then) will I believe you .... and thank the gods that I
S> don't have to use Windows 98.

   I've tried all combinations of quotes (single, double) and
   separators ( / or \ or \\). The way to eliminate the
   error is removing of path separator (any of them) from beginning of
   quoted path or prepending dot to path (resulting in
   '.\\includes\\28ESP.pl'). And I think it's quite natural. Certainly
   can be a lot of meanings, but personally for me: The path to
   current directory is always ended with path separator even if
   modules like Cwd prints curdir path without final separator. Quoted
   path is RELATIVE to curdir. On Linux path like this
   '/includes/28ESP.pl' isn't relative.is


S> Cheers,
S> Rob



-- 
Ñ óâàæåíèåì,
 Ñåðãåé                            mailto:[EMAIL PROTECTED]


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to