lib/Mojo/Darkpan.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 33 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Mojo/Darkpan/Controller/Publish.pm ↑ Summary
1 package Mojo::Darkpan;
2 3 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use FindBin;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use Mojo::Base 'Mojolicious', -signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use Mojo::Darkpan::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶sub startup ($self) {
Subroutine startup: called CC=1 SCAR=0.0
Pod documented
9  
10 # https://metacpan.org/pod/Mojolicious::Plugin::BasicAuthPlus
11 2 $self->plugin('basic_auth_plus');
12 2 $self->plugin( 'DirectoryHandler',
13 delivery_path => Mojo::Darkpan::Config->new->path );
14  
15 #----------
16 # Router
17 #----------
18 2 my $r = $self->routes;
19 2 my $index = $r->any('/');
20 2 $index->get('/list')->to( controller => 'index', action => 'list' );
21 2 $index->get('/reindex')->to( controller => 'index', action => 'reindex' );
22  
23 2 my $uploader = $r->any('/publish');
24 2 $uploader->post('/')->to( controller => 'publish', action => 'upload' );
25  
26 # goes to the same place as publish, used for compatibility
27 2 my $authenquery = $r->any('/authenquery');
28 2 $authenquery->post('/')->to( controller => 'publish', action => 'upload' );
29  
30 }
31  
32 3 our $VERSION = "0.10";
33  
34 3 1;
35 __END__
« lib/Mojo/Darkpan/Controller/Publish.pm ↑ Summary