mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2010-01-11 04:54 am

[dw-free] 32bit support

[commit: http://hg.dwscoalition.org/dw-free/rev/a85caf951e7e]

http://bugs.dwscoalition.org/show_bug.cgi?id=1632

Further change this so that it properly sets the include path so we can
always find the module, or die if it can't. (Helps some scripts like
ljmaint.pl which don't setup include paths.)

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/ljlib.pl
--------------------------------------------------------------------------------
diff -r c22b4bb13976 -r a85caf951e7e cgi-bin/ljlib.pl
--- a/cgi-bin/ljlib.pl	Mon Jan 11 04:46:12 2010 +0000
+++ b/cgi-bin/ljlib.pl	Mon Jan 11 04:53:56 2010 +0000
@@ -16,8 +16,6 @@ use strict;
 use strict;
 no warnings 'uninitialized';
 
-use LJ::Config;
-
 BEGIN {
     # ugly hack to shutup dependent libraries which sometimes want to bring in
     # ljlib.pl (via require, ick!).  so this lets them know if it's recursive.
@@ -28,7 +26,14 @@ BEGIN {
     $LJ::HOME ||= $ENV{LJHOME};
     die "No \$LJ::HOME set, or not a directory!\n"
         unless $LJ::HOME && -d $LJ::HOME;
+}
 
+# now that the library is setup, we can start pulling things in.  start with
+# the configuration library we need.
+use lib "$LJ::HOME/cgi-bin";
+use LJ::Config;
+
+BEGIN {
     # mod_perl does this early too, make sure we do as well
     LJ::Config->load;
 
@@ -44,8 +49,6 @@ BEGIN {
         $LJ::PUBLICBIT = 2 ** 63;
     }
 }
-
-use lib "$LJ::HOME/cgi-bin";
 
 use Apache2::Connection ();
 use Carp;
--------------------------------------------------------------------------------