File tree 8 files changed +39
-30
lines changed
8 files changed +39
-30
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ use Config::ZOMG ();
12
12
use Log::Log4perl ();
13
13
use Log::Log4perl::MDC ();
14
14
use File::Spec ();
15
- use File::Path ();
16
15
use Plack::Builder qw( builder enable ) ;
17
16
use Digest::SHA ();
18
17
@@ -46,7 +45,7 @@ BEGIN {
46
45
}
47
46
48
47
use lib " $root_dir /lib" ;
49
- use MetaCPAN::Web;
48
+ use MetaCPAN::Web () ;
50
49
51
50
STDERR -> autoflush;
52
51
Original file line number Diff line number Diff line change 1
1
package MetaCPAN::Middleware::Static ;
2
2
use strict;
3
3
use warnings;
4
- use Plack::Builder qw( builder enable mount ) ;
5
- use Plack::App::File ();
6
- use JavaScript::Minifier::XS ();
7
- use Cwd qw( cwd ) ;
8
- use Plack::MIME ();
9
- use JSON::MaybeXS ();
4
+ use Plack::Builder qw( builder enable mount ) ;
5
+ use Plack::App::File ();
6
+ use Cwd qw( cwd ) ;
7
+ use Plack::MIME ();
8
+ use JSON::MaybeXS ();
10
9
11
10
Plack::MIME-> add_type(
12
11
' .eot' => ' application/vnd.ms-fontobject' ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package MetaCPAN::Web::Controller::About;
2
2
3
3
use Moose;
4
4
5
- use Cpanel::JSON::XS qw( encode_json) ;
5
+ use Cpanel::JSON::XS qw( encode_json ) ;
6
6
7
7
BEGIN { extends ' MetaCPAN::Web::Controller' }
8
8
Original file line number Diff line number Diff line change @@ -7,12 +7,11 @@ BEGIN { extends 'MetaCPAN::Web::Controller' }
7
7
8
8
use DateTime ();
9
9
use HTML::Escape qw( escape_html ) ;
10
- use MetaCPAN::Web::Types qw( ArrayRef Enum HashRef Str Undef Uri DateTime ) ;
10
+ use MetaCPAN::Web::Types qw( ArrayRef DateTime Enum HashRef Str Undef Uri ) ;
11
11
use Params::ValidationCompiler qw( validation_for ) ;
12
12
use Path::Tiny qw( path ) ;
13
13
use MetaCPAN::Web::RenderUtil qw( render_markdown ) ;
14
14
use URI ();
15
- use XML::FeedPP ();
16
15
17
16
sub recent_rdf : Path(' /recent.rdf' ) Args(0) {
18
17
my ( $self , $c ) = @_ ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package MetaCPAN::Web::Model::API::Pod;
2
2
use Moose;
3
3
use namespace::autoclean;
4
4
5
- use MetaCPAN::Web::RenderUtil qw( split_index filter_html ) ;
5
+ use MetaCPAN::Web::RenderUtil qw( filter_html split_index ) ;
6
6
use Encode qw( encode ) ;
7
7
use Future ();
8
8
use HTML::TokeParser ();
Original file line number Diff line number Diff line change @@ -7,14 +7,12 @@ use namespace::autoclean;
7
7
8
8
use Cpanel::JSON::XS qw( decode_json encode_json ) ;
9
9
10
- use IO::Async::Loop ();
11
- use IO::Async::SSL ();
12
- use IO::Socket::SSL qw( SSL_VERIFY_PEER ) ;
13
- use Net::Async::HTTP ();
14
- use HTTP::Request::Common ();
15
- use MIME::Base64 qw( encode_base64url) ;
16
- use Crypt::OpenSSL::RSA ();
17
- use Ref::Util qw( is_arrayref is_hashref) ;
10
+ use IO::Async::Loop ();
11
+ use IO::Socket::SSL qw( SSL_VERIFY_PEER ) ;
12
+ use Net::Async::HTTP ();
13
+ use MIME::Base64 qw( encode_base64url ) ;
14
+ use Crypt::OpenSSL::RSA ();
15
+ use Ref::Util qw( is_arrayref is_hashref ) ;
18
16
19
17
my $loop ;
20
18
Original file line number Diff line number Diff line change @@ -8,7 +8,20 @@ use HTML::Escape qw( escape_html );
8
8
use HTML::Restrict ();
9
9
use URI ();
10
10
use Digest::MD5 ();
11
- use CommonMark qw( :node :event ) ;
11
+ use CommonMark qw(
12
+ EVENT_ENTER
13
+ EVENT_EXIT
14
+ NODE_CODE
15
+ NODE_CODE_BLOCK
16
+ NODE_DOCUMENT
17
+ NODE_HEADER
18
+ NODE_HRULE
19
+ NODE_HTML
20
+ NODE_INLINE_HTML
21
+ NODE_LINEBREAK
22
+ NODE_SOFTBREAK
23
+ NODE_TEXT
24
+ ) ;
12
25
13
26
our @EXPORT_OK = qw(
14
27
filter_html
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings;
3
- use Plack::Builder;
3
+ use Plack::Builder qw( builder enable mount ) ;
4
4
use Plack::App::Proxy;
5
- use File::Basename;
6
- use Config::ZOMG ();
5
+ use File::Basename () ;
6
+ use Config::ZOMG ();
7
7
8
- my $root_dir ; BEGIN { $root_dir = File::Basename::dirname(__FILE__ ); }
8
+ my $root_dir ;
9
+ BEGIN { $root_dir = File::Basename::dirname(__FILE__ ); }
9
10
use lib " $root_dir /lib" ;
10
11
11
12
my $port = $ENV {METACPAN_WEB_PORT } || 5001;
@@ -17,8 +18,8 @@ my $config = Config::ZOMG->open(
17
18
18
19
builder {
19
20
enable ' +MetaCPAN::Middleware::Static' => (
20
- root => $root_dir ,
21
- config => $config ,
21
+ root => $root_dir ,
22
+ config => $config ,
22
23
dev_mode => 1,
23
24
);
24
25
enable sub {
@@ -31,10 +32,10 @@ builder {
31
32
};
32
33
};
33
34
mount ' /' => Plack::App::Proxy-> new(
34
- remote => " http://localhost:$port " ,
35
+ remote => " http://localhost:$port " ,
35
36
preserve_host_header => 1,
36
- backend => ' LWP' ,
37
- options => {
37
+ backend => ' LWP' ,
38
+ options => {
38
39
env_proxy => 0,
39
40
},
40
41
)-> to_app;
You can’t perform that action at this time.
0 commit comments