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