A rough cut of the /search action.
[catagits/Gitalist.git] / lib / Gitalist.pm
CommitLineData
89de6a33 1package Gitalist;
42fe5d11 2use Moose;
3use namespace::autoclean;
89de6a33 4
5use Catalyst::Runtime 5.80;
6
42fe5d11 7extends 'Catalyst';
89de6a33 8
89de6a33 9use Catalyst qw/-Debug
10 ConfigLoader
d5cc37a4 11 Static::Simple
deb6344b 12 StackTrace/;
13
89de6a33 14our $VERSION = '0.01';
15
4666d5c7 16# Bring in the libified gitweb.cgi.
17use gitweb;
18
d3feefcf 19__PACKAGE__->config(
deb6344b 20 name => 'Gitalist',
21 default_view => 'Default',
d3feefcf 22);
89de6a33 23
24# Start the application
25__PACKAGE__->setup();
26
30e4d46d 27around uri_for => sub {
28 my ($orig, $c) = (shift, shift);
29 my $params = Catalyst::Utils::merge_hashes(
30 { p => $c->model('Git')->project },
31 ref($_[-1]) eq 'HASH' ? pop @_ : {}
32 );
33 (my $uri = $c->$orig(@_, $params))
34 =~ tr[&][;];
35 return $uri;
36};
deb6344b 37
89de6a33 38=head1 NAME
39
40Gitalist - Catalyst based application
41
42=head1 SYNOPSIS
43
44 script/gitalist_server.pl
45
46=head1 DESCRIPTION
47
48[enter your description here]
49
50=head1 SEE ALSO
51
52L<Gitalist::Controller::Root>, L<Catalyst>
53
42fe5d11 54=head1 AUTHORS AND COPYRIGHT
89de6a33 55
42fe5d11 56 Catalyst application:
57 (C) 2009 Venda Ltd and Dan Brook <dbrook@venda.com>
58
59 Original gitweb.cgi from which this was derived:
60 (C) 2005-2006, Kay Sievers <kay.sievers@vrfy.org>
61 (C) 2005, Christian Gierke
89de6a33 62
63=head1 LICENSE
64
42fe5d11 65FIXME - Is this going to be GPLv2 as per gitweb? If so this is broken..
66
89de6a33 67This library is free software. You can redistribute it and/or modify
68it under the same terms as Perl itself.
69
70=cut
71
721;