Unicode::Encoding
Static::Simple
StackTrace
+ SubRequest
/;
-our $VERSION = '0.000005';
+our $VERSION = '0.001008';
$VERSION = eval $VERSION;
__PACKAGE__->config(
name => 'Gitalist',
default_view => 'Default',
default_model => 'CollectionOfRepos',
+ use_request_uri_for_path => 1,
+ disable_component_resolution_regex_fallback => 1,
);
__PACKAGE__->setup();
+after prepare_path => sub {
+ my ($ctx) = @_;
+ if ($ctx->req->param('a')) {
+ $ctx->request->uri->path('/legacy' . $ctx->request->uri->path);
+ }
+};
+
around uri_for => sub {
my ($orig, $c) = (shift, shift);
- my $repository_name = $c->stash->{'Repository'} && $c->stash->{'Repository'}->name;
- my $hash = ref($_[-1]) eq 'HASH' ? pop @_ : {};
- my $params = Catalyst::Utils::merge_hashes(
- { p => $hash->{p} || $repository_name },
- $hash,
- );
- delete $params->{p} unless defined $params->{p} && length $params->{p};
- (my $uri = $c->$orig(@_, $params))
- =~ tr[&][;];
+ my $uri = $c->$orig(@_);
+ $$uri =~ tr[&][;] if defined $uri;
return $uri;
};
+around uri_for_action => sub {
+ my ($orig, $c) = (shift, shift);
+ my $uri = $c->$orig(@_);
+ $$uri =~ s[/fragment\b][] if defined $uri;
+ return $uri;
+};
+
+sub uri_with {
+ my ($self, @args) = @_;
+ my $uri = $self->request->uri_with(@args);
+ # Wow this awful.
+ $uri =~ s[/fragment\b][];
+ return $uri;
+}
+
1;
__END__
(this file is specifically in C<.gitignore> so you can have your own copy):
#!/bin/sh
- export PERL5LIB=/home/t0m/public_html/Gitalist/lib:/home/t0m/perl5/lib/perl5:$PERL5LIB
exec /home/t0m/public_html/Gitalist/script/gitalist_fastcgi.pl
This example can be seen live here:
- http://goatse.co.uk/~bobtfish/Gitalist/script/gitalist.fcgi/
+ http://example.gitalist.com
=head1 CONTRIBUTING