From e245bd1eae41b5419ef52a33915eef62bc8c367a Mon Sep 17 00:00:00 2001 From: Emil Williams Date: Thu, 21 Aug 2025 01:13:38 +0000 Subject: [PATCH] Redefinition Is Expected --- config.default.pl | 20 ++++++++++++-------- perl/cgi.pl | 2 ++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/config.default.pl b/config.default.pl index 9fbc1a2..167630c 100644 --- a/config.default.pl +++ b/config.default.pl @@ -1,18 +1,22 @@ # always assume anything to do with files or directories is ran at project root +use constant { + # If you're using lighttpd, set this to 1 # This disables SOCKET_FILE and lets the socket handling be externally managed -use constant BARE_REQUEST => 0; +BARE_REQUEST => 0, + +IMMORTAL => 1, # will continue handling request after death/error -use constant IMMORTAL => 1; # will continue handling request after death/error +LOG_FILE => '/tmp/gorillanest.log', +DB_FILE => 'gorillanest.sqlite3', # sqlite3 -use constant LOG_FILE => '/tmp/gorillanest.log'; -use constant DB_FILE => 'gorillanest.sqlite3'; # sqlite3 +SOCKET_FILE => '/tmp/gorillanest.socket', +SOCKET_MAX_CONNECTIONS => 100, -use constant SOCKET_FILE => '/tmp/gorillanest.socket'; -use constant SOCKET_MAX_CONNECTIONS => 100; +TEMPLATE_ROOT => 'template', # template directory +GIT_ROOT => 'git', # git directory (~user/repo) -use constant TEMPLATE_ROOT => 'template'; # template directory -use constant GIT_ROOT => 'git'; # git directory (~user/repo) +} 1; diff --git a/perl/cgi.pl b/perl/cgi.pl index 3cbed42..f8dc7ac 100755 --- a/perl/cgi.pl +++ b/perl/cgi.pl @@ -21,8 +21,10 @@ use Data::Dumper; use Git::Repository; use lib qw(. ..); +no warnings 'redefine'; BEGIN { require 'config.default.pl'; } BEGIN { require 'config.pl'; } +use warnings 'redefine'; sub info { warn join(' ', @_); -- 2.39.5