App-opan
view release on metacpan or search on metacpan
lib/App/opan.pm view on Meta::CPAN
$_[0]->stash(path => $_[0]->stash->{dist_path});
$combined_static->dispatch($_[0]) or $serve_upstream->($_[0]);
};
get '/nopin/authors/id/*dist_path' => sub {
$_[0]->stash(path => $_[0]->stash->{dist_path});
$nopin_static->dispatch($_[0]) or $serve_upstream->($_[0]);
};
get "/autopin/modules/02packages.details.txt" => sub {
return $_[0]->render(text => 'Autopin off', status => 404)
unless $ENV{OPAN_AUTOPIN};
$base_static->dispatch($_[0]->stash(path => "nopin/index"));
};
get "/autopin/modules/02packages.details.txt.gz" => sub {
return $_[0]->render(text => 'Autopin off', status => 404)
unless $ENV{OPAN_AUTOPIN};
$base_static->dispatch($_[0]->stash(path => "nopin/index.gz"));
};
get '/autopin/authors/id/*dist_path' => sub {
return $_[0]->render(text => 'Autopin off', status => 404)
unless $ENV{OPAN_AUTOPIN};
return if $nopin_static->dispatch($_[0]->stash(path => $_[0]->stash->{dist_path}));
return if eval {
do_pin(app, $_[0]->stash->{path});
$pinset_static->dispatch($_[0]);
};
return $_[0]->render(text => 'Not found', status => 404);
};
caller() ? app : app->tap(sub { shift->log->level('fatal') })->start;
=head1 NAME
App::opan - A CPAN overlay for darkpan and pinning purposes
=head1 SYNOPSIS
script/opan view on Meta::CPAN
$_[0]->stash(path => $_[0]->stash->{dist_path});
$combined_static->dispatch($_[0]) or $serve_upstream->($_[0]);
};
get '/nopin/authors/id/*dist_path' => sub {
$_[0]->stash(path => $_[0]->stash->{dist_path});
$nopin_static->dispatch($_[0]) or $serve_upstream->($_[0]);
};
get "/autopin/modules/02packages.details.txt" => sub {
return $_[0]->render(text => 'Autopin off', status => 404)
unless $ENV{OPAN_AUTOPIN};
$base_static->dispatch($_[0]->stash(path => "nopin/index"));
};
get "/autopin/modules/02packages.details.txt.gz" => sub {
return $_[0]->render(text => 'Autopin off', status => 404)
unless $ENV{OPAN_AUTOPIN};
$base_static->dispatch($_[0]->stash(path => "nopin/index.gz"));
};
get '/autopin/authors/id/*dist_path' => sub {
return $_[0]->render(text => 'Autopin off', status => 404)
unless $ENV{OPAN_AUTOPIN};
return if $nopin_static->dispatch($_[0]->stash(path => $_[0]->stash->{dist_path}));
return if eval {
do_pin(app, $_[0]->stash->{path});
$pinset_static->dispatch($_[0]);
};
return $_[0]->render(text => 'Not found', status => 404);
};
caller() ? app : app->tap(sub { shift->log->level('fatal') })->start;
=head1 NAME
App::opan - A CPAN overlay for darkpan and pinning purposes
=head1 SYNOPSIS
( run in 1.948 second using v1.01-cache-2.11-cpan-39bf76dae61 )