File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,14 @@ use v5.14;
77
88use App::CPANModuleSite;
99
10- @ARGV or die "Usage: $0 <distribution_name>\n";
10+ @ARGV or die "Usage: $0 <distribution_name> [<base_url>] \n";
1111
12- my $app = App::CPANModuleSite->new($ARGV[0]);
12+ my $args = { distribution => $ARGV[0] };
13+ if (@ARGV > 1) {
14+ $args->{base} = $ARGV[1];
15+ }
16+
17+ my $app = App::CPANModuleSite->new($args);
1318
1419$app->run;
1520
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ It's probably not particularly useful to use the class directly.
1313
1414package App::CPANModuleSite ;
1515
16- our $VERSION = ' 0.0.6 ' ;
16+ our $VERSION = ' 0.0.1 ' ;
1717
1818use v5.14;
1919
@@ -105,6 +105,7 @@ sub _build_tt_config {
105105 distribution => $self -> distribution,
106106 release => $self -> release,
107107 modules => $self -> modules,
108+ base => $self -> base,
108109 },
109110 }
110111}
@@ -168,6 +169,12 @@ sub _build_wrapper {
168169 return ' page.tt' ;
169170}
170171
172+ has base => (
173+ is => ' ro' ,
174+ isa => ' Str' ,
175+ default => ' ' ,
176+ );
177+
171178around BUILDARGS => sub {
172179 my $orig = shift ;
173180 my $class = shift ;
Original file line number Diff line number Diff line change 22<!doctype html>
33<html lang="en">
44 <head>
5+ [% IF base -%]
6+ <base href="[% base %]">
7+ [% END -%]
58 <!-- Required meta tags -->
69 <meta charset="utf-8">
710 <meta name="viewport" content="width=device-width, initial-scale=1">
You can’t perform that action at this time.
0 commit comments