extends 'Catalyst';
-use Catalyst qw/-Debug
+use Catalyst qw/
ConfigLoader
- Static::Simple/;
+ Static::Simple
+ StackTrace/;
+
our $VERSION = '0.01';
# Bring in the libified gitweb.cgi.
use gitweb;
__PACKAGE__->config(
- name => 'Gitalist',
- default_view => 'Default',
+ name => 'Gitalist',
+ default_view => 'Default',
+ default_model => 'Git', # Yes, we are going to be changing this.
);
# Start the application
__PACKAGE__->setup();
+around uri_for => sub {
+ my ($orig, $c) = (shift, shift);
+ my $params = Catalyst::Utils::merge_hashes(
+ { p => $c->model('Git')->project },
+ ref($_[-1]) eq 'HASH' ? pop @_ : {}
+ );
+ (my $uri = $c->$orig(@_, $params))
+ =~ tr[&][;];
+ return $uri;
+};
+
=head1 NAME
Gitalist - Catalyst based application