diff options
Diffstat (limited to 'gorillanest.pl.cgi')
| -rwxr-xr-x[-rw-r--r--] | gorillanest.pl.cgi | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gorillanest.pl.cgi b/gorillanest.pl.cgi index c964c8f..8f688aa 100644..100755 --- a/gorillanest.pl.cgi +++ b/gorillanest.pl.cgi @@ -2,7 +2,6 @@ use strict; use warnings; - use CGI; use Switch::Back; use Template; @@ -23,7 +22,7 @@ our $template = Template->new({INCLUDE_PATH => 'template'}); # significant dirs only sub GN::directories { my $root = $_[0]; - opendir my $dir, $root or die "Cannot open directory '$root': $!"; + opendir my $dir, $root or die "$root: $!"; my @directories; my %drop = ( '.' => 0, @@ -76,8 +75,8 @@ my %routes = ( '/~([a-zA-Z0-9_.]+)/([a-zA-Z0-9_.]+)' => sub { serve_template("repository.tt", @_) }, ); -my $public = 'git/public'; -my $dbfile = 'gorillanest.sqlite3'; +my $root = GIT_ROOT; +my $dbfile = DB_FILE; my %data = ( found => 0, ); @@ -101,4 +100,6 @@ sub master { serve_template("404.tt"); # XXX missing code } -master() if !caller; 1; +master() if !caller; + +1; |
