# UCW Gallery -- Master Program
# (c) 2012 Martin Mares <mj@ucw.cz>
-use strict;
-use warnings;
+use common::sense;
use Getopt::Long;
use FindBin;
-x $sub_path or die "Unknown subcommand $sub\n";
$ENV{"GALLERY_ROOT"} = $gallery_root;
-$ENV{"PERL5LIB"} = join(":", $gallery_root, $ENV{"PERL5LIB"} // ());
+$ENV{"PERL5LIB"} = join(":", $gallery_root . "/lib", $ENV{"PERL5LIB"} // ());
if (!$all) {
exec $sub_path, @ARGV;