xref: /openbsd-src/gnu/usr.bin/perl/cpan/CPAN/lib/CPAN/Exception/blocked_urllist.pm (revision b8851fcc53cbe24fd20b090f26dd149e353f6174)
1# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2# vim: ts=4 sts=4 sw=4:
3package CPAN::Exception::blocked_urllist;
4use strict;
5use overload '""' => "as_string";
6
7use vars qw(
8            $VERSION
9);
10$VERSION = "1.001";
11
12
13sub new {
14    my($class) = @_;
15    bless {}, $class;
16}
17
18sub as_string {
19    my($self) = shift;
20    if ($CPAN::Config->{connect_to_internet_ok}) {
21        return qq{
22
23You have not configured a urllist for CPAN mirrors. Configure it with
24
25    o conf init urllist
26
27};
28    } else {
29        return qq{
30
31You have not configured a urllist and do not allow connections to the
32internet to get a list of mirrors.  If you wish to get a list of CPAN
33mirrors to pick from, use this command
34
35    o conf init connect_to_internet_ok urllist
36
37If you do not wish to get a list of mirrors and would prefer to set
38your urllist manually, use just this command instead
39
40    o conf init urllist
41
42};
43    }
44}
45
461;
47