File tree Expand file tree Collapse file tree 5 files changed +62
-2
lines changed
lib/MetaCPAN/Web/Controller Expand file tree Collapse file tree 5 files changed +62
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ sub meta_hack : Local : Args(0) {
3838 my ( $self , $c ) = @_ ;
3939}
4040
41+ sub mirror : Local : Args(0) { }
42+
4143sub sponsors : Local : Args(0) {
4244 my ( $self , $c ) = @_ ;
4345}
Original file line number Diff line number Diff line change 1+ %% cascade base::about::markdown {
2+ %% title => $title || 'Using MetaCPAN as a mirror',
3+ %% }
4+ %% override about -> {
5+ ## MetaCPAN Mirror
6+
7+ MetaCPAN provides an alternate mirror for CPAN, which is also a BackPAN (it
8+ includes deleted releases). It can be used if there are issues with the primary
9+ mirror, or you want to access older deleted releases via the `cpan` client.
10+
11+ The address for the mirror is https://cpan.metacpan.org/
12+
13+ ### Configuring the Mirror
14+
15+ #### `cpanm`
16+
17+ `cpanm` can use the MetaCPAN mirror using the `-M` option:
18+
19+ cpanm -M https://cpan.metacpan.org/ Module::To::Install
20+
21+ When using the MetaCPAN mirror, it may also be useful to use MetaCPAN's index.
22+ This can be done using the `--metacpan` option.
23+
24+ cpanm -M https://cpan.metacpan.org/ --metacpan Module::To::Install
25+
26+ These options can be set more permanantly using the `PERL_CPANM_OPT` environment variable.
27+
28+ export PERL_CPANM_OPT='-M https://cpan.metacpan.org/ --metacpan'
29+ cpanm Module::To::Install
30+
31+ #### `cpan`
32+
33+ `CPAN.pm` can be configured to use an alternate mirror using the `urllist`
34+ configuration setting. It also must be configured to use the `urllist` option
35+ by disabling the `pushy_https` option.
36+
37+ cpan
38+ o conf urllist https://cpan.metacpan.org/
39+ o conf pushy_https 0
40+ o conf commit
41+ install Module::To::Install
42+ exit
43+
44+ %% }
Original file line number Diff line number Diff line change 2222 <link rel="shortcut icon" href="/static/icons/favicon.ico">
2323 <link rel="apple-touch-icon" sizes="152x152" href="/static/icons/apple-touch-icon.png">
2424 <link rel="search" href="/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
25- <script async src="https://perl-ads.perlhacks.com/perl-ads.js"></script>
2625 <script async src="https://www.googletagmanager.com/gtag/js?id=G-6B2JCQSHJE"></script>
2726 %% block opengraph -> { }
2827 </head>
118117 </ul>
119118 </nav>
120119 <div class="page-content [% block page_content_class -> { } %]">
121- <div id="perl-ad-target" class="top-notify-banner perl-ad-target">
120+ <div class="top-notify-banner alert-banner">
121+ <p>
122+ <i class="fa-solid fa-triangle-exclamation"></i>
123+ There is an ongoing outage on the primary CPAN mirror. It is
124+ possible to work around the issue by <a href="/about/mirror">using
125+ MetaCPAN as a mirror</a>.
126+ </p>
122127 </div>
123128 <nav class="sidebar">
124129 %% block left_nav -> {
Original file line number Diff line number Diff line change 1212 [ 'FAQ', '/about/faq' ],
1313 [ 'Contributors', '/about/contributors' ],
1414 [ 'meta::hack', '/about/meta_hack' ],
15+ [ 'CPAN Mirror', '/about/mirror' ],
1516 [ 'Missing Modules', '/about/missing_modules' ],
1617 [ 'Distribution Metadata', '/about/metadata' ],
1718] -> $l {
Original file line number Diff line number Diff line change 2828 color : #c0d2e4 ;
2929 text-decoration : underline ;
3030 }
31+
32+ p :last-child {
33+ margin-bottom : 0 ;
34+ }
35+
36+ & .alert-banner {
37+ background-color : #c00 ;
38+ }
3139}
3240
3341.navbar {
You can’t perform that action at this time.
0 commit comments