Skip to content
Merged
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
2 changes: 2 additions & 0 deletions lib/MetaCPAN/Web/Controller/About.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ sub meta_hack : Local : Args(0) {
my ( $self, $c ) = @_;
}

sub mirror : Local : Args(0) { }

sub sponsors : Local : Args(0) {
my ( $self, $c ) = @_;
}
Expand Down
44 changes: 44 additions & 0 deletions root/about/mirror.tx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
%% cascade base::about::markdown {
%% title => $title || 'Using MetaCPAN as a mirror',
%% }
%% override about -> {
## MetaCPAN Mirror

MetaCPAN provides an alternate mirror for CPAN, which is also a BackPAN (it
includes deleted releases). It can be used if there are issues with the primary
mirror, or you want to access older deleted releases via the `cpan` client.

The address for the mirror is https://cpan.metacpan.org/

### Configuring the Mirror

#### `cpanm`

`cpanm` can use the MetaCPAN mirror using the `-M` option:

cpanm -M https://cpan.metacpan.org/ Module::To::Install

When using the MetaCPAN mirror, it may also be useful to use MetaCPAN's index.
This can be done using the `--metacpan` option.

cpanm -M https://cpan.metacpan.org/ --metacpan Module::To::Install

These options can be set more permanantly using the `PERL_CPANM_OPT` environment variable.

export PERL_CPANM_OPT='-M https://cpan.metacpan.org/ --metacpan'
cpanm Module::To::Install

#### `cpan`

`CPAN.pm` can be configured to use an alternate mirror using the `urllist`
configuration setting. It also must be configured to use the `urllist` option
by disabling the `pushy_https` option.

cpan
o conf urllist https://cpan.metacpan.org/
o conf pushy_https 0
o conf commit
install Module::To::Install
exit

%% }
9 changes: 7 additions & 2 deletions root/base.tx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<link rel="shortcut icon" href="/static/icons/favicon.ico">
<link rel="apple-touch-icon" sizes="152x152" href="/static/icons/apple-touch-icon.png">
<link rel="search" href="/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
<script async src="https://perl-ads.perlhacks.com/perl-ads.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6B2JCQSHJE"></script>
%% block opengraph -> { }
</head>
Expand Down Expand Up @@ -118,7 +117,13 @@
</ul>
</nav>
<div class="page-content [% block page_content_class -> { } %]">
<div id="perl-ad-target" class="top-notify-banner perl-ad-target">
<div class="top-notify-banner alert-banner">
<p>
<i class="fa-solid fa-triangle-exclamation"></i>
There is an ongoing outage on the primary CPAN mirror. It is
possible to work around the issue by <a href="/about/mirror">using
MetaCPAN as a mirror</a>.
</p>
</div>
<nav class="sidebar">
%% block left_nav -> {
Expand Down
1 change: 1 addition & 0 deletions root/base/about.tx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ for [
[ 'FAQ', '/about/faq' ],
[ 'Contributors', '/about/contributors' ],
[ 'meta::hack', '/about/meta_hack' ],
[ 'CPAN Mirror', '/about/mirror' ],
[ 'Missing Modules', '/about/missing_modules' ],
[ 'Distribution Metadata', '/about/metadata' ],
] -> $l {
Expand Down
8 changes: 8 additions & 0 deletions root/static/less/nav.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
color: #c0d2e4;
text-decoration: underline;
}

p:last-child {
margin-bottom: 0;
}

&.alert-banner {
background-color: #c00;
}
}

.navbar {
Expand Down
Loading