[dw-free] Update texttool to work with my cpanm libdir
[commit: http://hg.dwscoalition.org/dw-free/rev/34ac73d3b5ea]
Update texttool to work with my cpanm libdir
Patch by
mark.
Files modified:
Update texttool to work with my cpanm libdir
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- bin/upgrading/texttool.pl
-------------------------------------------------------------------------------- diff -r 550a567c7851 -r 34ac73d3b5ea bin/upgrading/texttool.pl --- a/bin/upgrading/texttool.pl Thu Dec 22 02:16:13 2011 +0800 +++ b/bin/upgrading/texttool.pl Thu Dec 22 05:06:45 2011 +0000 @@ -18,12 +18,16 @@ # use strict; +use lib "$ENV{LJHOME}/cgi-bin"; + +BEGIN { require "ljlib.pl"; } use File::Basename (); use File::Path (); use Getopt::Long; -use lib "$ENV{LJHOME}/cgi-bin"; use LJ::Config; LJ::Config->load; use LJ::LangDatFile; +use LJ::Lang; +use LJ::Web; my $opt_help = 0; my $opt_local_lang; @@ -66,15 +70,6 @@ '; } -## make sure $LJHOME is set so we can load & run everything -unless (-d $ENV{'LJHOME'}) { - die "LJHOME environment variable is not set, or is not a directory.\n". - "You must fix this before you can run this database update script."; -} -require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl"; -use LJ::Lang; -use LJ::Web; - my %dom_id; # number -> {} my %dom_code; # name -> {} my %lang_id; # number -> {} --------------------------------------------------------------------------------