Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OPAN_LOG_LEVEL support; and add git repo metadata to Makefile.PL #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@ WriteMakefile(
'File::chdir' => '0.1010',
'Capture::Tiny' => '0.27',
},
META_MERGE => {
"meta-spec" => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'https://github.com/shadowcat-mst/App-opan.git',
web => 'https://github.com/shadowcat-mst/App-opan',
},
},
},
);
7 changes: 6 additions & 1 deletion script/opan
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ get '/autopin/authors/id/*dist_path' => sub {
return $_[0]->render(text => 'Not found', status => 404);
};

caller() ? app : app->tap(sub { shift->log->level('fatal') })->start;
caller() ? app : app->tap(sub { shift->log->level($ENV{OPAN_LOG_LEVEL} || 'fatal') })->start;

=head1 NAME

Expand Down Expand Up @@ -665,6 +665,11 @@ www.cpan.org. Remember that if you need to temporarily overlay your overlay
but only for one user, there's nothing stopping you setting OPAN_MIRROR to
another opan.

=head2 logging

The default log level is C<fatal>. Set the ENV var OPAN_LOG_LEVEL to one of
the log levels accepted by L<Mojo::Log>, like C<warn>, C<info> or C<trace>.

=head1 AUTHOR

Matt S. Trout (mst) <[email protected]>
Expand Down