From: mkanat%bugzilla.org <> Date: Fri, 19 Oct 2007 11:46:10 +0000 (+0000) Subject: Bug 399954: Make Bugzilla able to hold its dependencies in a local directory X-Git-Tag: bugzilla-3.1.3~491 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=415e32d463bbb881d991d886ddba6f859669c098;p=thirdparty%2Fbugzilla.git Bug 399954: Make Bugzilla able to hold its dependencies in a local directory Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/Chart.pm b/Bugzilla/Chart.pm index 9701f7b32d..a119e4b7cd 100644 --- a/Bugzilla/Chart.pm +++ b/Bugzilla/Chart.pm @@ -22,7 +22,6 @@ # A. Karl Kornel use strict; -use lib "."; # This module represents a chart. # diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index f84ece0063..827bb2d4b6 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -445,6 +445,7 @@ sub bz_locations { # That means that if you modify these paths, they must be absolute paths. return { 'libpath' => $libpath, + 'ext_libpath' => "$libpath/lib", # If you put the libraries in a different location than the CGIs, # make sure this still points to the CGIs. 'cgi_path' => $libpath, diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index 8387d01734..127fe0b58b 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -62,6 +62,7 @@ sub FILESYSTEM { my $webdotdir = bz_locations()->{'webdotdir'}; my $templatedir = bz_locations()->{'templatedir'}; my $libdir = bz_locations()->{'libpath'}; + my $extlib = bz_locations()->{'ext_libpath'}; my $skinsdir = bz_locations()->{'skinsdir'}; my $ws_group = Bugzilla->localconfig->{'webservergroup'}; @@ -152,6 +153,8 @@ sub FILESYSTEM { dirs => $ws_dir_readable }, "$libdir/Bugzilla" => { files => $ws_readable, dirs => $ws_dir_readable }, + $extlib => { files => $ws_readable, + dirs => $ws_dir_readable }, $templatedir => { files => $ws_readable, dirs => $ws_dir_readable }, images => { files => $ws_readable, @@ -251,6 +254,8 @@ EOT contents => $ht_default_deny }, "$libdir/Bugzilla/.htaccess" => { perms => $ws_readable, contents => $ht_default_deny }, + "$extlib/.htaccess" => { perms => $ws_readable, + contents => $ht_default_deny }, "$templatedir/.htaccess" => { perms => $ws_readable, contents => $ht_default_deny }, diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index 877f69866e..d6fd7a08a3 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -21,7 +21,6 @@ # Lance Larsh use strict; -use lib "."; # This module implements a series - a set of data to be plotted on a chart. # diff --git a/admin.cgi b/admin.cgi index 3edff13387..83cc55d8b0 100644 --- a/admin.cgi +++ b/admin.cgi @@ -21,7 +21,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/attachment.cgi b/attachment.cgi index 82f650f3c6..cc6408f2ba 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -35,7 +35,7 @@ # Make it harder for us to do dangerous things in Perl. use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/buglist.cgi b/buglist.cgi index 71b6fd14f4..0f98a38111 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -32,7 +32,7 @@ # Make it harder for us to do dangerous things in Perl. use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/chart.cgi b/chart.cgi index db48745707..97bf9e77d2 100755 --- a/chart.cgi +++ b/chart.cgi @@ -43,7 +43,7 @@ # Offer subscription when you get a "series already exists" error? use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/checksetup.pl b/checksetup.pl index 81d4a819f2..f1cf9e2246 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -51,7 +51,7 @@ use POSIX qw(setlocale LC_CTYPE); use Safe; BEGIN { chdir dirname($0); } -use lib "."; +use lib qw(. lib); use Bugzilla::Constants; use Bugzilla::Install::Requirements; use Bugzilla::Install::Util qw(install_string get_version_and_os); diff --git a/colchange.cgi b/colchange.cgi index b2deb3274b..c580547ce3 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -24,7 +24,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/collectstats.pl b/collectstats.pl index a1ab9b2d19..1e5c5fd9d1 100755 --- a/collectstats.pl +++ b/collectstats.pl @@ -34,7 +34,7 @@ use AnyDBM_File; use strict; use IO::Handle; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/config.cgi b/config.cgi index 84bcb9038e..ad8dbf0fe5 100755 --- a/config.cgi +++ b/config.cgi @@ -28,7 +28,7 @@ # Make it harder for us to do dangerous things in Perl. use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/contrib/bz_webservice_demo.pl b/contrib/bz_webservice_demo.pl index 70fb6c2943..72dd78a19d 100755 --- a/contrib/bz_webservice_demo.pl +++ b/contrib/bz_webservice_demo.pl @@ -29,6 +29,7 @@ C for detailed help =cut use strict; +use lib qw(lib); use Getopt::Long; use Pod::Usage; use File::Basename qw(dirname); diff --git a/contrib/bzdbcopy.pl b/contrib/bzdbcopy.pl index 489909882a..9edf585afe 100755 --- a/contrib/bzdbcopy.pl +++ b/contrib/bzdbcopy.pl @@ -19,7 +19,7 @@ # Contributor(s): Max Kanat-Alexander use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::DB; use Bugzilla::Util; diff --git a/contrib/merge-users.pl b/contrib/merge-users.pl index f071f7c2c1..ac689abfdf 100644 --- a/contrib/merge-users.pl +++ b/contrib/merge-users.pl @@ -44,7 +44,7 @@ merge-users.pl - Merge two user accounts. =cut -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/contrib/recode.pl b/contrib/recode.pl index 49e824f6d3..713465be76 100755 --- a/contrib/recode.pl +++ b/contrib/recode.pl @@ -20,8 +20,7 @@ # Contributor(s): Max Kanat-Alexander use strict; -# Allow the script to be run from contrib or as contrib/recode.pl -use lib '..'; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/contrib/sendbugmail.pl b/contrib/sendbugmail.pl index ae282ca4a6..4fd1c83740 100644 --- a/contrib/sendbugmail.pl +++ b/contrib/sendbugmail.pl @@ -4,7 +4,7 @@ # # Nick Barnes, Ravenbrook Limited, 2004-04-01. # -# $Id: sendbugmail.pl,v 1.7 2006/07/03 21:42:47 mkanat%bugzilla.org Exp $ +# $Id: sendbugmail.pl,v 1.8 2007/10/19 06:46:17 mkanat%bugzilla.org Exp $ # # Bugzilla email script for Bugzilla 2.17.4 and later. Invoke this to send # bugmail for a bug which has been changed directly in the database. @@ -14,7 +14,7 @@ # # Usage: perl -T contrib/sendbugmail.pl bug_id user_email -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Util; diff --git a/contrib/sendunsentbugmail.pl b/contrib/sendunsentbugmail.pl index 5ed49b22ed..ec92a97a06 100644 --- a/contrib/sendunsentbugmail.pl +++ b/contrib/sendunsentbugmail.pl @@ -23,7 +23,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/contrib/syncLDAP.pl b/contrib/syncLDAP.pl index 72ea917980..07fa6f46b4 100755 --- a/contrib/syncLDAP.pl +++ b/contrib/syncLDAP.pl @@ -22,7 +22,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Net::LDAP; use Bugzilla; diff --git a/createaccount.cgi b/createaccount.cgi index 1ec7ec31d1..c10c9b378c 100755 --- a/createaccount.cgi +++ b/createaccount.cgi @@ -26,7 +26,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/describecomponents.cgi b/describecomponents.cgi index b282040c50..8061837836 100755 --- a/describecomponents.cgi +++ b/describecomponents.cgi @@ -23,7 +23,7 @@ # Frédéric Buclin use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/describekeywords.cgi b/describekeywords.cgi index 70c0ba4e05..5ff5c50896 100755 --- a/describekeywords.cgi +++ b/describekeywords.cgi @@ -22,7 +22,7 @@ # Contributor(s): Gervase Markham use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Error; diff --git a/docs/makedocs.pl b/docs/makedocs.pl index b636a2f37a..1b9a44296b 100644 --- a/docs/makedocs.pl +++ b/docs/makedocs.pl @@ -34,7 +34,7 @@ BEGIN { chdir dirname($0); } -use lib qw(.. lib); +use lib qw(.. ../lib lib); # We only compile our POD if Pod::Simple is installed. We do the checks # this way so that if there's a compile error in Pod::Simple::HTML::Bugzilla, diff --git a/docs/xml/installation.xml b/docs/xml/installation.xml index 57b004e3cb..58b7d33aaf 100644 --- a/docs/xml/installation.xml +++ b/docs/xml/installation.xml @@ -1,5 +1,5 @@ - + Installing Bugzilla @@ -1123,7 +1123,7 @@ - PerlSwitches -I/var/www/html/bugzilla -w -T + PerlSwitches -I/var/www/html/bugzilla -I/var/www/html/bugzilla/lib -w -T PerlConfigRequire /var/www/html/bugzilla/mod_perl.pl diff --git a/duplicates.cgi b/duplicates.cgi index e393d7c257..32553a39d7 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -27,7 +27,7 @@ use strict; use AnyDBM_File; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editclassifications.cgi b/editclassifications.cgi index cacc47fb6e..03d3af81cb 100755 --- a/editclassifications.cgi +++ b/editclassifications.cgi @@ -21,7 +21,7 @@ # Direct any questions on this source code to mozilla.org use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editcomponents.cgi b/editcomponents.cgi index dd693c05f4..46b319edd3 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -24,7 +24,7 @@ # Akamai Technologies use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editfields.cgi b/editfields.cgi index e57e1952c4..50564c1909 100644 --- a/editfields.cgi +++ b/editfields.cgi @@ -16,7 +16,7 @@ # Contributor(s): Frédéric Buclin use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editflagtypes.cgi b/editflagtypes.cgi index e32b7f5095..47eac753ec 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -27,7 +27,7 @@ # Make it harder for us to do dangerous things in Perl. use strict; -use lib "."; +use lib qw(. lib); # Use Bugzilla's flag modules for handling flag types. use Bugzilla; diff --git a/editgroups.cgi b/editgroups.cgi index 19db870ec5..b7223e08dc 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -25,7 +25,7 @@ # Frédéric Buclin use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editkeywords.cgi b/editkeywords.cgi index 3aca22e438..7ded21471f 100755 --- a/editkeywords.cgi +++ b/editkeywords.cgi @@ -21,7 +21,7 @@ # Contributor(s): Terry Weissman use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editmilestones.cgi b/editmilestones.cgi index 7776253268..0be0f6c7f1 100755 --- a/editmilestones.cgi +++ b/editmilestones.cgi @@ -16,7 +16,7 @@ # use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editparams.cgi b/editparams.cgi index 819c8c6458..39faa16c6e 100755 --- a/editparams.cgi +++ b/editparams.cgi @@ -23,7 +23,7 @@ # Frédéric Buclin use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editproducts.cgi b/editproducts.cgi index 5a937db9d3..7c6c52f7d3 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -32,7 +32,7 @@ # Holger Schurig use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editsettings.cgi b/editsettings.cgi index a4a85710f9..cf87e63263 100755 --- a/editsettings.cgi +++ b/editsettings.cgi @@ -17,7 +17,7 @@ # use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editusers.cgi b/editusers.cgi index e452eea01d..b996c139e8 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -21,7 +21,7 @@ # Gavin Shelley use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editvalues.cgi b/editvalues.cgi index 520c0797b2..f60ab634e5 100755 --- a/editvalues.cgi +++ b/editvalues.cgi @@ -19,7 +19,7 @@ # with some cleanup. use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Util; diff --git a/editversions.cgi b/editversions.cgi index 223f1f5559..ac7b2c7a03 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -29,7 +29,7 @@ # Holger Schurig use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editwhines.cgi b/editwhines.cgi index ba39b543dd..7da598dd8b 100755 --- a/editwhines.cgi +++ b/editwhines.cgi @@ -27,7 +27,7 @@ use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/editworkflow.cgi b/editworkflow.cgi index d599a97fdc..eddf845f22 100644 --- a/editworkflow.cgi +++ b/editworkflow.cgi @@ -21,7 +21,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/email_in.pl b/email_in.pl index ea5082844d..7b8232192d 100644 --- a/email_in.pl +++ b/email_in.pl @@ -29,6 +29,8 @@ BEGIN { chdir(File::Basename::dirname($0)); } +use lib qw(. lib); + use Data::Dumper; use Email::Address; use Email::Reply qw(reply); diff --git a/enter_bug.cgi b/enter_bug.cgi index d4ee73bfb0..dc26804738 100755 --- a/enter_bug.cgi +++ b/enter_bug.cgi @@ -35,7 +35,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/importxml.pl b/importxml.pl index 9ef8150f62..80506971cf 100755 --- a/importxml.pl +++ b/importxml.pl @@ -54,22 +54,16 @@ use strict; # ##################################################################### -# figure out which path this script lives in. Set the current path to -# this and add it to @INC so this will work when run as part of mail -# alias by the mailer daemon -# since "use lib" is run at compile time, we need to enclose the -# $::path declaration in a BEGIN block so that it is executed before -# the rest of the file is compiled. +use File::Basename qw(dirname); +# MTAs may call this script from any directory, but it should always +# run from this one so that it can find its modules. BEGIN { - $::path = $0; - $::path =~ m#(.*)/[^/]+#; - $::path = $1; - $::path ||= '.'; # $0 is empty at compile time. This line will - # have no effect on this script at runtime. + require File::Basename; + my $dir = $0; $dir =~ /(.*)/; $dir = $1; # trick taint + chdir(File::Basename::dirname($dir)); } -chdir $::path; -use lib ($::path); +use lib qw(. lib); # Data dumber is used for debugging, I got tired of copying it back in # and then removing it. #use Data::Dumper; diff --git a/index.cgi b/index.cgi index 7d1525b58f..100941765d 100755 --- a/index.cgi +++ b/index.cgi @@ -29,7 +29,7 @@ use strict; # Include the Bugzilla CGI and general utility library. -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/lib/README b/lib/README new file mode 100644 index 0000000000..5778a9a3f2 --- /dev/null +++ b/lib/README @@ -0,0 +1,4 @@ +This directory contains the Perl modules that Bugzilla requires to run. + +If you would rather have Bugzilla use the Perl modules installed on your +system, you can delete everything in this directory. diff --git a/long_list.cgi b/long_list.cgi index c02c8deda5..7e1f69534e 100755 --- a/long_list.cgi +++ b/long_list.cgi @@ -22,7 +22,7 @@ # Gervase Markham use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; my $cgi = Bugzilla->cgi; diff --git a/page.cgi b/page.cgi index 43a826590d..290a4acb6b 100755 --- a/page.cgi +++ b/page.cgi @@ -30,7 +30,7 @@ use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Error; diff --git a/post_bug.cgi b/post_bug.cgi index 8ce7f07234..2ef2dcde59 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -25,7 +25,7 @@ # Marc Schumann use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Attachment; diff --git a/process_bug.cgi b/process_bug.cgi index 56931c2938..d7fee81992 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -43,7 +43,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/query.cgi b/query.cgi index bd69330e94..aaabc15294 100755 --- a/query.cgi +++ b/query.cgi @@ -26,7 +26,7 @@ # Max Kanat-Alexander use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Bug; diff --git a/quips.cgi b/quips.cgi index bb0e5afffc..295b6c83fc 100755 --- a/quips.cgi +++ b/quips.cgi @@ -25,7 +25,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/relogin.cgi b/relogin.cgi index 5aa187490f..e2182699aa 100755 --- a/relogin.cgi +++ b/relogin.cgi @@ -23,7 +23,7 @@ # A. Karl Kornel use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Mailer; diff --git a/report.cgi b/report.cgi index 10c532163e..9ee5df287e 100755 --- a/report.cgi +++ b/report.cgi @@ -22,7 +22,7 @@ # use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/reports.cgi b/reports.cgi index 7ed396935f..40bbc82bb5 100755 --- a/reports.cgi +++ b/reports.cgi @@ -37,7 +37,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/request.cgi b/request.cgi index 186b42e1c4..6c3ff48eeb 100755 --- a/request.cgi +++ b/request.cgi @@ -28,7 +28,7 @@ # Make it harder for us to do dangerous things in Perl. use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Util; diff --git a/runtests.pl b/runtests.pl index ad6898b239..092d8069b9 100755 --- a/runtests.pl +++ b/runtests.pl @@ -23,6 +23,7 @@ # Make it harder for us to do dangerous things in Perl. use diagnostics; use strict; +use lib qw(lib); use Test::Harness qw(&runtests $verbose); diff --git a/sanitycheck.cgi b/sanitycheck.cgi index 3d718a0dc8..b1a48b16aa 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -26,7 +26,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/sanitycheck.pl b/sanitycheck.pl index 5c383e67d6..5f158cb3b5 100644 --- a/sanitycheck.pl +++ b/sanitycheck.pl @@ -21,7 +21,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/search_plugin.cgi b/search_plugin.cgi index e3384fcced..5048f7ce6a 100644 --- a/search_plugin.cgi +++ b/search_plugin.cgi @@ -16,7 +16,7 @@ # Contributor(s): Frédéric Buclin use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Error; diff --git a/show_activity.cgi b/show_activity.cgi index e127872304..d2570f8b10 100755 --- a/show_activity.cgi +++ b/show_activity.cgi @@ -24,7 +24,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Error; diff --git a/show_bug.cgi b/show_bug.cgi index 6aa3145656..4e3aac982f 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -22,7 +22,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/showattachment.cgi b/showattachment.cgi index f535d5c9da..e90a01533e 100755 --- a/showattachment.cgi +++ b/showattachment.cgi @@ -23,7 +23,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Util; diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi index 30d7ebac1c..f7977446ef 100755 --- a/showdependencygraph.cgi +++ b/showdependencygraph.cgi @@ -23,7 +23,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use File::Temp; diff --git a/showdependencytree.cgi b/showdependencytree.cgi index 070986d5ef..80e67716af 100755 --- a/showdependencytree.cgi +++ b/showdependencytree.cgi @@ -26,7 +26,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Error; diff --git a/sidebar.cgi b/sidebar.cgi index 5619d6b407..35c4e64ad5 100755 --- a/sidebar.cgi +++ b/sidebar.cgi @@ -17,7 +17,7 @@ use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Error; diff --git a/summarize_time.cgi b/summarize_time.cgi index df1297e5e0..071f89a67a 100755 --- a/summarize_time.cgi +++ b/summarize_time.cgi @@ -19,7 +19,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Date::Parse; # strptime diff --git a/testserver.pl b/testserver.pl index 6169a77e0d..9b649277ca 100755 --- a/testserver.pl +++ b/testserver.pl @@ -19,7 +19,7 @@ # issues as possible. use strict; -use lib "."; +use lib qw(. lib); BEGIN { my $envpath = $ENV{'PATH'}; diff --git a/token.cgi b/token.cgi index dd41e46652..a880d3294a 100755 --- a/token.cgi +++ b/token.cgi @@ -28,7 +28,7 @@ # Make it harder for us to do dangerous things in Perl. use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/userprefs.cgi b/userprefs.cgi index efe07921be..e2cc2e0ce9 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -24,7 +24,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/votes.cgi b/votes.cgi index 9805ae48eb..9fe94484a1 100755 --- a/votes.cgi +++ b/votes.cgi @@ -25,7 +25,7 @@ # Frédéric Buclin use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/whine.pl b/whine.pl index a809025c09..963805be69 100755 --- a/whine.pl +++ b/whine.pl @@ -26,7 +26,7 @@ use strict; -use lib "."; +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants; diff --git a/whineatnews.pl b/whineatnews.pl index 12a86cb6b1..5c1ec655da 100755 --- a/whineatnews.pl +++ b/whineatnews.pl @@ -29,7 +29,7 @@ # touched for more than the number of days specified in the whinedays param. use strict; -use lib '.'; +use lib qw(. lib); use Bugzilla; use Bugzilla::Mailer; diff --git a/xml.cgi b/xml.cgi index 8316971c9a..ce6a7c39b1 100755 --- a/xml.cgi +++ b/xml.cgi @@ -24,7 +24,7 @@ use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; my $cgi = Bugzilla->cgi; diff --git a/xmlrpc.cgi b/xmlrpc.cgi index c17cab86c3..227815d267 100755 --- a/xmlrpc.cgi +++ b/xmlrpc.cgi @@ -16,7 +16,7 @@ # Contributor(s): Marc Schumann use strict; -use lib qw(.); +use lib qw(. lib); use Bugzilla; use Bugzilla::Constants;