Item1241: setlib dies hard on Perl's where FILE does not tell you a path

pencil
Priority: Urgent
Current State: No Action Required
Released In: 1.0.4
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: OlivierRaginel
to my frustration, strawberry perl 5.10.0.3 appears to have FILE == "filename"

it doesn't even manage to use the LocalLib setting - because the loading of the Locallib.cfg also assumes that FILE contains the full path.

grrr - ok, i was in a foul mood before i started on this, I thought that it would be a happy making diversion frown, sad smile

Software error:

/../lib: No such file or directory at setlib.cfg line 48
 at C:/strawberry/perl/lib/Cwd.pm line 318
   Cwd::_croak('/../lib: No such file or directory') called at C:/strawberry/perl/lib/Cwd.pm line 594
   Cwd::fast_abs_path('/../lib') called at setlib.cfg line 48
   require setlib.cfg called at C:/Program Files/Foswiki/Foswiki/bin/view line 40
   main::BEGIN() called at LocalLib.cfg line 0
   eval {...} called at LocalLib.cfg line 0
Compilation failed in require at C:/Program Files/Foswiki/Foswiki/bin/view line 40.
 at C:/Program Files/Foswiki/Foswiki/bin/view line 40
   main::BEGIN() called at setlib.cfg line 41
   eval {...} called at setlib.cfg line 41
BEGIN failed--compilation aborted at C:/Program Files/Foswiki/Foswiki/bin/view line 41.
 at C:/Program Files/Foswiki/Foswiki/bin/view line 41

as a test

C:\Program Files\Foswiki\Foswiki\bin>more test.pl
#!c:/strawberry/perl/bin/perl -wT

print "__FILE__ = ".__FILE__."\n";

C:\Program Files\Foswiki\Foswiki\bin>c:\strawberry\perl\bin\perl.exe -wT test.pl
__FILE__ = test.pl

-- SvenDowideit - 11 Mar 2009

If FILE is set to simply the filename, the code will work just like it used to be, using Cwd::abs_path( "../lib" )

There was an issue in the code I committed where I left a / hanging around, which was fixed in distro:567c97b8b15c

Please check that you have this fix in your code. If you do, then there is something rotten in the state of Denmark (sorry Kenneth, Shaekespeare, for once, didn't blame the French)

-- OlivierRaginel - 11 Mar 2009

After checking the time-line, the latest beta was built on the 5th, and my fix was done on the 6th, which explains why it's not in your code and crashes.

Thanks for reporting, but this has already been fixed, therefore I'm rejecting it.

-- OlivierRaginel - 11 Mar 2009

ItemTemplate edit

Summary setlib dies hard on Perl's where FILE does not tell you a path
ReportedBy SvenDowideit
Codebase 1.0.3
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Urgent
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease patch
ReleasedIn 1.0.4
Topic revision: r2 - 11 Mar 2009, OlivierRaginel
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy