This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
document Git_Data
[perl5.git] / lib / CPAN / Exception / blocked_urllist.pm
1 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2 # vim: ts=4 sts=4 sw=4:
3 package CPAN::Exception::blocked_urllist;
4 use strict;
5 use overload '""' => "as_string";
6
7 use vars qw(
8             $VERSION
9 );
10 $VERSION = "1.0";
11
12
13 sub new {
14     my($class) = @_;
15     bless {}, $class;
16 }
17
18 sub as_string {
19     my($self) = shift;
20     if ($CPAN::Config->{connect_to_internet_ok}) {
21         return qq{
22
23 You have not configured a urllist. Please consider to set it with
24
25     o conf init urllist
26
27 };
28     } else {
29         return qq{
30
31 You have not configured a urllist and did not allow to connect to the
32 internet. Please consider to call
33
34     o conf init connect_to_internet_ok urllist
35
36 };
37     }
38 }
39
40 1;