Re: AW: AW: @INC and cross-platform path usage

2008-07-02 Thread Jenda Krynicky
From: Tobias Eichner <[EMAIL PROTECTED]> > @Gunnar Hjalmarsson: > > > use File::Spec; > > my ($vol, $progdir); > > BEGIN { ($vol, $progdir) = File::Spec->splitpath( __FILE__ ) } > > use lib File::Spec->catpath( $vol, $progdir, 'libraries' ); > > At http://perldoc.perl.org/perl

Re: AW: AW: @INC and cross-platform path usage

2008-07-01 Thread Gunnar Hjalmarsson
Tobias Eichner wrote: @Gunnar Hjalmarsson: use File::Spec; my ($vol, $progdir); BEGIN { ($vol, $progdir) = File::Spec->splitpath( __FILE__ ) } use lib File::Spec->catpath( $vol, $progdir, 'libraries' ); At http://perldoc.perl.org/perldata.html it is stated that __FILE__ c

AW: AW: @INC and cross-platform path usage

2008-07-01 Thread Tobias Eichner
@Gunnar Hjalmarsson: > use File::Spec; > my ($vol, $progdir); > BEGIN { ($vol, $progdir) = File::Spec->splitpath( __FILE__ ) } > use lib File::Spec->catpath( $vol, $progdir, 'libraries' ); At http://perldoc.perl.org/perldata.html it is stated that __FILE__ contains the curren

Re: AW: @INC and cross-platform path usage

2008-07-01 Thread Gunnar Hjalmarsson
Tobias Eichner wrote: Gunnar Hjalmarsson wrote: Both those methods assume that the path to the directory where the program resides equals the current working directory. That's often the case, but not always. Isn't the "working directory" always the path where the program executes from ? No

AW: @INC and cross-platform path usage

2008-07-01 Thread Tobias Eichner
PERL5LIB is no choice, since there would be the same issue of how to write paths a cross-platform way. > Both those methods assume that the path to the directory where the > program resides equals the current working directory. That's often the > case, but not always. Isn't the "working direct