Commit e60c6f6e authored by Andrew Dunstan's avatar Andrew Dunstan

Set Perl search path more idiomatically

Back in commits 1df92eea, f884a968, and 592123ef I used some
hackish code to set the script search path, unaware despite decades of
perl that there was a completely standard way to do this. This patch
changes those cases to use the standard perl FindBin package.
parent 149f2ae8
...@@ -17,9 +17,8 @@ use strict; ...@@ -17,9 +17,8 @@ use strict;
use warnings; use warnings;
use Getopt::Long; use Getopt::Long;
use File::Basename; use FindBin;
use File::Spec; use lib $FindBin::RealBin;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); }
use Catalog; use Catalog;
......
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
use strict; use strict;
use warnings; use warnings;
use File::Basename; use FindBin;
use File::Spec; use lib $FindBin::RealBin;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); }
use Cwd; use Cwd;
......
...@@ -6,9 +6,8 @@ ...@@ -6,9 +6,8 @@
use strict; use strict;
use warnings; use warnings;
use File::Basename; use FindBin;
use File::Spec; use lib $FindBin::RealBin;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); }
use Install qw(Install); use Install qw(Install);
......
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
use strict; use strict;
use warnings; use warnings;
use File::Basename; use FindBin;
use File::Spec; use lib $FindBin::RealBin;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); }
use Mkvcbuild; use Mkvcbuild;
......
...@@ -12,8 +12,9 @@ use File::Basename; ...@@ -12,8 +12,9 @@ use File::Basename;
use File::Copy; use File::Copy;
use File::Find (); use File::Find ();
use File::Path qw(rmtree); use File::Path qw(rmtree);
use File::Spec;
BEGIN { use lib File::Spec->rel2abs(dirname(__FILE__)); } use FindBin;
use lib $FindBin::RealBin;
use Install qw(Install); use Install qw(Install);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment