]> git.xolatile.top Git - gorillanest.git/commitdiff
Shut It Down!
authorEmil Williams <emilemilemil@cock.li>
Thu, 21 Aug 2025 02:06:04 +0000 (02:06 +0000)
committerEmil Williams <emilemilemil@cock.li>
Thu, 21 Aug 2025 02:06:04 +0000 (02:06 +0000)
config.default.pl
perl/cgi.pl

index 326ddcf2a60cb8b478c3872f0577a8fc09f9f826..0e7e6bf0918edff0a47dfc8499c413389fa22171 100644 (file)
@@ -1,7 +1,5 @@
 # always assume anything to do with files or directories is ran at project root
 
-no warnings;
-
 use constant {
 
 # If you're using lighttpd, set this to 1
@@ -10,6 +8,7 @@ BARE_REQUEST           => 0,
 
 IMMORTAL               => 1, # will continue handling request after death/error
 
+LOG_FILE               => '/tmp/gorillanest.log',
 DB_FILE                => 'gorillanest.sqlite3', # sqlite3
 
 SOCKET_FILE            => '/tmp/gorillanest.socket',
index d19c915eb49d7289b8e0ed777d93f579e749ed21..b802979b141b19fa5bfeb30fd4d93a45b3c2a1ed 100755 (executable)
@@ -21,8 +21,14 @@ use Data::Dumper;
 use Git::Repository;
 
 use lib qw(. ..);
-BEGIN { require 'config.default.pl'; }
-BEGIN { require 'config.pl' if -f 'config.pl'; }
+BEGIN {
+    # ignores redefinition... and everything else
+    open my $stderr, '>&', \*STDERR;
+    open STDERR, '>', '/dev/null';
+    require 'config.default.pl';
+    require 'config.pl' if -f 'config.pl';
+    open STDERR, '>&', $stderr;
+}
 
 sub info {
     warn join(' ', @_);
@@ -87,13 +93,13 @@ my $dbfile = DB_FILE;
 
 my %data = (
     found => 0,
-);
+    );
 
 my %routes = (
     '/'                   => sub { GN::index($root); },
     '/~([\w.]+)'          => sub { GN::user($root, @_) },
     '/~([\w.]+)/([\w.]+)' => sub { GN::repository($root, @_) },
-);
+    );
 my %route_regex_cache = map { $_ => qr{^$_$} } keys %routes;
 
 sub master {