Added the Catalyst app Gitalist with gitweb.cgi shim.
Dan Brook [Wed, 5 Aug 2009 09:15:37 +0000 (10:15 +0100)]
Further hacking of gitweb.cgi to behave when require()ed.

At this point it roughly works in as far as you get a gitweb interface
(which looks a bit wonky). Not sure what to do with it next, but changing
the print()s in gitweb.cgi to TT would be a good start.

25 files changed:
Gitalist/Changes [new file with mode: 0644]
Gitalist/Makefile.PL [new file with mode: 0644]
Gitalist/README [new file with mode: 0644]
Gitalist/gitalist.conf [new file with mode: 0644]
Gitalist/lib/Gitalist.pm [new file with mode: 0644]
Gitalist/lib/Gitalist/Controller/Root.pm [new file with mode: 0644]
Gitalist/root/favicon.ico [new file with mode: 0644]
Gitalist/root/static/images/btn_120x50_built.png [new file with mode: 0644]
Gitalist/root/static/images/btn_120x50_built_shadow.png [new file with mode: 0644]
Gitalist/root/static/images/btn_120x50_powered.png [new file with mode: 0644]
Gitalist/root/static/images/btn_120x50_powered_shadow.png [new file with mode: 0644]
Gitalist/root/static/images/btn_88x31_built.png [new file with mode: 0644]
Gitalist/root/static/images/btn_88x31_built_shadow.png [new file with mode: 0644]
Gitalist/root/static/images/btn_88x31_powered.png [new file with mode: 0644]
Gitalist/root/static/images/btn_88x31_powered_shadow.png [new file with mode: 0644]
Gitalist/root/static/images/catalyst_logo.png [new file with mode: 0644]
Gitalist/script/gitalist_cgi.pl [new file with mode: 0755]
Gitalist/script/gitalist_create.pl [new file with mode: 0755]
Gitalist/script/gitalist_fastcgi.pl [new file with mode: 0755]
Gitalist/script/gitalist_server.pl [new file with mode: 0755]
Gitalist/script/gitalist_test.pl [new file with mode: 0755]
Gitalist/t/01app.t [new file with mode: 0644]
Gitalist/t/02pod.t [new file with mode: 0644]
Gitalist/t/03podcoverage.t [new file with mode: 0644]
gitweb.cgi

diff --git a/Gitalist/Changes b/Gitalist/Changes
new file mode 100644 (file)
index 0000000..03f7451
--- /dev/null
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension Gitalist.
+
+0.01  2009-08-04 16:36:40
+        - initial revision, generated by Catalyst
diff --git a/Gitalist/Makefile.PL b/Gitalist/Makefile.PL
new file mode 100644 (file)
index 0000000..360e49d
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+# IMPORTANT: if you delete this file your app will not work as
+# expected.  You have been warned.
+use inc::Module::Install;
+
+name 'Gitalist';
+all_from 'lib/Gitalist.pm';
+
+requires 'Catalyst::Runtime' => '5.80003';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+requires 'parent';
+requires 'Config::General'; # This should reflect the config file format you've chosen
+                 # See Catalyst::Plugin::ConfigLoader for supported formats
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;
diff --git a/Gitalist/README b/Gitalist/README
new file mode 100644 (file)
index 0000000..6c59e16
--- /dev/null
@@ -0,0 +1 @@
+Run script/gitalist_server.pl to test the application.
diff --git a/Gitalist/gitalist.conf b/Gitalist/gitalist.conf
new file mode 100644 (file)
index 0000000..55a06ed
--- /dev/null
@@ -0,0 +1,3 @@
+# rename this file to Gitalist.yml and put a ':' in front of 'name' if
+# you want to use YAML like in old versions of Catalyst
+name Gitalist
diff --git a/Gitalist/lib/Gitalist.pm b/Gitalist/lib/Gitalist.pm
new file mode 100644 (file)
index 0000000..4d62b62
--- /dev/null
@@ -0,0 +1,65 @@
+package Gitalist;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime 5.80;
+
+# Set flags and add plugins for the application
+#
+#         -Debug: activates the debug mode for very useful log messages
+#   ConfigLoader: will load the configuration from a Config::General file in the
+#                 application's home directory
+# Static::Simple: will serve static files from the application's root
+#                 directory
+
+use parent qw/Catalyst/;
+use Catalyst qw/-Debug
+                ConfigLoader
+                Static::Simple/;
+our $VERSION = '0.01';
+
+# Configure the application.
+#
+# Note that settings in gitalist.conf (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with an external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config( name => 'Gitalist' );
+
+# Start the application
+__PACKAGE__->setup();
+
+require '/var/www/cgi-bin/gitalist/gitweb.cgi';
+
+=head1 NAME
+
+Gitalist - Catalyst based application
+
+=head1 SYNOPSIS
+
+    script/gitalist_server.pl
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 SEE ALSO
+
+L<Gitalist::Controller::Root>, L<Catalyst>
+
+=head1 AUTHOR
+
+Dan Brook,,,
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
diff --git a/Gitalist/lib/Gitalist/Controller/Root.pm b/Gitalist/lib/Gitalist/Controller/Root.pm
new file mode 100644 (file)
index 0000000..2ead38b
--- /dev/null
@@ -0,0 +1,69 @@
+package Gitalist::Controller::Root;
+
+use strict;
+use warnings;
+use parent 'Catalyst::Controller';
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config->{namespace} = '';
+
+=head1 NAME
+
+Gitalist::Controller::Root - Root Controller for Gitalist
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 METHODS
+
+=cut
+
+=head2 index
+
+=cut
+
+#sub index :Path :Args(0) {
+#    my ( $self, $c ) = @_;
+#
+#    # Hello World
+#    $c->response->body( $c->welcome_message );
+#}
+
+use IO::Capture::Stdout;
+sub default :Path {
+    my ( $self, $c ) = @_;
+
+       my $capture = IO::Capture::Stdout->new();
+       $capture->start();
+       eval { gitweb::main() };
+       $capture->stop();
+
+       my $output = join '', $capture->read;
+       $output =~ s/\A.*?\r?\n\r?\n//s;
+    $c->response->body( $output );
+}
+
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut
+
+sub end : ActionClass('RenderView') {}
+
+=head1 AUTHOR
+
+Dan Brook,,,
+
+=head1 LICENSE
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
diff --git a/Gitalist/root/favicon.ico b/Gitalist/root/favicon.ico
new file mode 100644 (file)
index 0000000..5ad723d
Binary files /dev/null and b/Gitalist/root/favicon.ico differ
diff --git a/Gitalist/root/static/images/btn_120x50_built.png b/Gitalist/root/static/images/btn_120x50_built.png
new file mode 100644 (file)
index 0000000..c709fd6
Binary files /dev/null and b/Gitalist/root/static/images/btn_120x50_built.png differ
diff --git a/Gitalist/root/static/images/btn_120x50_built_shadow.png b/Gitalist/root/static/images/btn_120x50_built_shadow.png
new file mode 100644 (file)
index 0000000..15142fe
Binary files /dev/null and b/Gitalist/root/static/images/btn_120x50_built_shadow.png differ
diff --git a/Gitalist/root/static/images/btn_120x50_powered.png b/Gitalist/root/static/images/btn_120x50_powered.png
new file mode 100644 (file)
index 0000000..7249b47
Binary files /dev/null and b/Gitalist/root/static/images/btn_120x50_powered.png differ
diff --git a/Gitalist/root/static/images/btn_120x50_powered_shadow.png b/Gitalist/root/static/images/btn_120x50_powered_shadow.png
new file mode 100644 (file)
index 0000000..e6876c0
Binary files /dev/null and b/Gitalist/root/static/images/btn_120x50_powered_shadow.png differ
diff --git a/Gitalist/root/static/images/btn_88x31_built.png b/Gitalist/root/static/images/btn_88x31_built.png
new file mode 100644 (file)
index 0000000..007b5db
Binary files /dev/null and b/Gitalist/root/static/images/btn_88x31_built.png differ
diff --git a/Gitalist/root/static/images/btn_88x31_built_shadow.png b/Gitalist/root/static/images/btn_88x31_built_shadow.png
new file mode 100644 (file)
index 0000000..ccf4624
Binary files /dev/null and b/Gitalist/root/static/images/btn_88x31_built_shadow.png differ
diff --git a/Gitalist/root/static/images/btn_88x31_powered.png b/Gitalist/root/static/images/btn_88x31_powered.png
new file mode 100644 (file)
index 0000000..8f0cd9f
Binary files /dev/null and b/Gitalist/root/static/images/btn_88x31_powered.png differ
diff --git a/Gitalist/root/static/images/btn_88x31_powered_shadow.png b/Gitalist/root/static/images/btn_88x31_powered_shadow.png
new file mode 100644 (file)
index 0000000..aa776fa
Binary files /dev/null and b/Gitalist/root/static/images/btn_88x31_powered_shadow.png differ
diff --git a/Gitalist/root/static/images/catalyst_logo.png b/Gitalist/root/static/images/catalyst_logo.png
new file mode 100644 (file)
index 0000000..21f1cac
Binary files /dev/null and b/Gitalist/root/static/images/catalyst_logo.png differ
diff --git a/Gitalist/script/gitalist_cgi.pl b/Gitalist/script/gitalist_cgi.pl
new file mode 100755 (executable)
index 0000000..2ea0bb2
--- /dev/null
@@ -0,0 +1,43 @@
+#!/home/dbrook/apps/bin/perl
+
+use lib qw(
+       /home/dbrook/.perl-lib
+       /home/dbrook/.perl-lib/i686-linux-thread-multi
+       /home/dbrook/.perl/lib/perl5/i686-linux-thread-multi
+);
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Gitalist;
+
+Gitalist->run;
+
+1;
+
+=head1 NAME
+
+gitalist_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
diff --git a/Gitalist/script/gitalist_create.pl b/Gitalist/script/gitalist_create.pl
new file mode 100755 (executable)
index 0000000..41cf45e
--- /dev/null
@@ -0,0 +1,85 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+eval "use Catalyst::Helper;";
+
+if ($@) {
+  die <<END;
+To use the Catalyst development tools including catalyst.pl and the
+generated script/myapp_create.pl you need Catalyst::Helper, which is
+part of the Catalyst-Devel distribution. Please install this via a
+vendor package or by running one of -
+
+  perl -MCPAN -e 'install Catalyst::Devel'
+  perl -MCPANPLUS -e 'install Catalyst::Devel'
+END
+}
+
+my $force = 0;
+my $mech  = 0;
+my $help  = 0;
+
+GetOptions(
+    'nonew|force'    => \$force,
+    'mech|mechanize' => \$mech,
+    'help|?'         => \$help
+ );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
+
+pod2usage(1) unless $helper->mk_component( 'Gitalist', @ARGV );
+
+1;
+
+=head1 NAME
+
+gitalist_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+gitalist_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+   -force        don't create a .new file where a file to be created exists
+   -mechanize    use Test::WWW::Mechanize::Catalyst for tests if available
+   -help         display this help and exits
+
+ Examples:
+   gitalist_create.pl controller My::Controller
+   gitalist_create.pl -mechanize controller My::Controller
+   gitalist_create.pl view My::View
+   gitalist_create.pl view MyView TT
+   gitalist_create.pl view TT TT
+   gitalist_create.pl model My::Model
+   gitalist_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+   dbi:SQLite:/tmp/my.db
+   gitalist_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+   dbi:Pg:dbname=foo root 4321
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
diff --git a/Gitalist/script/gitalist_fastcgi.pl b/Gitalist/script/gitalist_fastcgi.pl
new file mode 100755 (executable)
index 0000000..7670449
--- /dev/null
@@ -0,0 +1,79 @@
+#!/usr/bin/env perl
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Gitalist;
+
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
+
+GetOptions(
+    'help|?'      => \$help,
+    'listen|l=s'  => \$listen,
+    'nproc|n=i'   => \$nproc,
+    'pidfile|p=s' => \$pidfile,
+    'manager|M=s' => \$manager,
+    'daemon|d'    => \$detach,
+    'keeperr|e'   => \$keep_stderr,
+);
+
+pod2usage(1) if $help;
+
+Gitalist->run(
+    $listen,
+    {   nproc   => $nproc,
+        pidfile => $pidfile,
+        manager => $manager,
+        detach  => $detach,
+        keep_stderr => $keep_stderr,
+    }
+);
+
+1;
+
+=head1 NAME
+
+gitalist_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+gitalist_fastcgi.pl [options]
+
+ Options:
+   -? -help      display this help and exits
+   -l -listen    Socket path to listen on
+                 (defaults to standard input)
+                 can be HOST:PORT, :PORT or a
+                 filesystem path
+   -n -nproc     specify number of processes to keep
+                 to serve requests (defaults to 1,
+                 requires -listen)
+   -p -pidfile   specify filename for pid file
+                 (requires -listen)
+   -d -daemon    daemonize (requires -listen)
+   -M -manager   specify alternate process manager
+                 (FCGI::ProcManager sub-class)
+                 or empty string to disable
+   -e -keeperr   send error messages to STDOUT, not
+                 to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
diff --git a/Gitalist/script/gitalist_server.pl b/Gitalist/script/gitalist_server.pl
new file mode 100755 (executable)
index 0000000..67e2662
--- /dev/null
@@ -0,0 +1,160 @@
+#!/usr/bin/env perl
+
+BEGIN {
+    $ENV{CATALYST_ENGINE} ||= 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = 39;
+    require Catalyst::Engine::HTTP;
+}
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+my $debug             = 0;
+my $fork              = 0;
+my $help              = 0;
+my $host              = undef;
+my $port              = $ENV{GITALIST_PORT} || $ENV{CATALYST_PORT} || 3000;
+my $keepalive         = 0;
+my $restart           = $ENV{GITALIST_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
+my $background        = 0;
+my $pidfile           = undef;
+
+my $check_interval;
+my $file_regex;
+my $watch_directory;
+my $follow_symlinks;
+
+my @argv = @ARGV;
+
+GetOptions(
+    'debug|d'             => \$debug,
+    'fork|f'              => \$fork,
+    'help|?'              => \$help,
+    'host=s'              => \$host,
+    'port|p=s'            => \$port,
+    'keepalive|k'         => \$keepalive,
+    'restart|r'           => \$restart,
+    'restartdelay|rd=s'   => \$check_interval,
+    'restartregex|rr=s'   => \$file_regex,
+    'restartdirectory=s@' => \$watch_directory,
+    'followsymlinks'      => \$follow_symlinks,
+    'background'          => \$background,
+    'pidfile=s'           => \$pidfile,
+);
+
+pod2usage(1) if $help;
+
+if ( $debug ) {
+    $ENV{CATALYST_DEBUG} = 1;
+}
+
+# If we load this here, then in the case of a restarter, it does not
+# need to be reloaded for each restart.
+require Catalyst;
+
+# If this isn't done, then the Catalyst::Devel tests for the restarter
+# fail.
+$| = 1 if $ENV{HARNESS_ACTIVE};
+
+my $runner = sub {
+    # This is require instead of use so that the above environment
+    # variables can be set at runtime.
+    require Gitalist;
+
+    Gitalist->run(
+        $port, $host,
+        {
+            argv       => \@argv,
+            'fork'     => $fork,
+            keepalive  => $keepalive,
+            background => $background,
+            pidfile    => $pidfile,
+        }
+    );
+};
+
+if ( $restart ) {
+    die "Cannot run in the background and also watch for changed files.\n"
+        if $background;
+
+    require Catalyst::Restarter;
+
+    my $subclass = Catalyst::Restarter->pick_subclass;
+
+    my %args;
+    $args{follow_symlinks} = 1
+        if $follow_symlinks;
+    $args{directories} = $watch_directory
+        if defined $watch_directory;
+    $args{sleep_interval} = $check_interval
+        if defined $check_interval;
+    $args{filter} = qr/$file_regex/
+        if defined $file_regex;
+
+    my $restarter = $subclass->new(
+        %args,
+        start_sub => $runner,
+        argv      => \@argv,
+    );
+
+    $restarter->run_and_watch;
+}
+else {
+    $runner->();
+}
+
+1;
+
+=head1 NAME
+
+gitalist_server.pl - Catalyst Testserver
+
+=head1 SYNOPSIS
+
+gitalist_server.pl [options]
+
+ Options:
+   -d -debug          force debug mode
+   -f -fork           handle each request in a new process
+                      (defaults to false)
+   -? -help           display this help and exits
+      -host           host (defaults to all)
+   -p -port           port (defaults to 3000)
+   -k -keepalive      enable keep-alive connections
+   -r -restart        restart when files get modified
+                      (defaults to false)
+   -rd -restartdelay  delay between file checks
+                      (ignored if you have Linux::Inotify2 installed)
+   -rr -restartregex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
+   -restartdirectory  the directory to search for
+                      modified files, can be set mulitple times
+                      (defaults to '[SCRIPT_DIR]/..')
+   -follow_symlinks   follow symlinks in search directories
+                      (defaults to false. this is a no-op on Win32)
+   -background        run the process in the background
+   -pidfile           specify filename for pid file
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
diff --git a/Gitalist/script/gitalist_test.pl b/Gitalist/script/gitalist_test.pl
new file mode 100755 (executable)
index 0000000..35da1af
--- /dev/null
@@ -0,0 +1,53 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Catalyst::Test 'Gitalist';
+
+my $help = 0;
+
+GetOptions( 'help|?' => \$help );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+print request($ARGV[0])->content . "\n";
+
+1;
+
+=head1 NAME
+
+gitalist_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+gitalist_test.pl [options] uri
+
+ Options:
+   -help    display this help and exits
+
+ Examples:
+   gitalist_test.pl http://localhost/some_action
+   gitalist_test.pl /some_action
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHORS
+
+Catalyst Contributors, see Catalyst.pm
+
+=head1 COPYRIGHT
+
+This library is free software. You can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
diff --git a/Gitalist/t/01app.t b/Gitalist/t/01app.t
new file mode 100644 (file)
index 0000000..977fe57
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+BEGIN { use_ok 'Catalyst::Test', 'Gitalist' }
+
+ok( request('/')->is_success, 'Request should succeed' );
diff --git a/Gitalist/t/02pod.t b/Gitalist/t/02pod.t
new file mode 100644 (file)
index 0000000..3d1bab1
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();
diff --git a/Gitalist/t/03podcoverage.t b/Gitalist/t/03podcoverage.t
new file mode 100644 (file)
index 0000000..4e1c6e7
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();
index 911f40e..604d2d2 100755 (executable)
@@ -6,6 +6,7 @@
 # (C) 2005, Christian Gierke
 #
 # This program is licensed under the GPLv2
+package gitweb;
 
 use strict;
 use warnings;
@@ -73,7 +74,7 @@ sub main {
 
        # core git executable to use
        # this can just be "git" if your webserver has a sensible PATH
-       our $GIT = "/usr/bin/git";
+       our $GIT = "/home/dbrook/apps/bin/git";
 
        # absolute fs-path which will be prepended to the project path
        our $projectroot = "/pub/scm";
@@ -438,7 +439,7 @@ sub main {
        if (-e $GITWEB_CONFIG) {
                do $GITWEB_CONFIG;
        } else {
-               our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || '/home/git/gitweb/gitweb.conf';
+               our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || '/home/dbrook/dev/gitweb/gitweb.conf';
                do $GITWEB_CONFIG_SYSTEM if -e $GITWEB_CONFIG_SYSTEM;
        }
 
@@ -805,7 +806,7 @@ sub main {
                die_error(400, "Project needed");
        }
        $actions{$action}->();
-       exit;
+       #exit;
 }
 
 sub gitweb_get_feature {
@@ -3131,7 +3132,7 @@ $status - $error
 </div>
 EOF
        git_footer_html();
-       exit;
+       die bless {};
 }
 
 ## ----------------------------------------------------------------------
@@ -6357,3 +6358,5 @@ XML
 </opml>
 XML
 }
+
+1;