diff options
author | Steve Peters <steve@fisharerojo.org> | 2009-04-14 00:21:05 -0500 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2009-04-14 00:21:05 -0500 |
commit | 512e1353c90135f2f86b8e9e0540d4f90ecc6215 (patch) | |
tree | 074ff148f3b7760be9aad1f85d684b1d44ebf4c8 /lib | |
parent | 2f2071b189aec38784eaa4544119619ec94657b8 (diff) | |
download | perl-512e1353c90135f2f86b8e9e0540d4f90ecc6215.tar.gz |
Add file missed in previous commit.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CPAN/Exception/blocked_urllist.pm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/CPAN/Exception/blocked_urllist.pm b/lib/CPAN/Exception/blocked_urllist.pm new file mode 100644 index 0000000000..0df385b7d3 --- /dev/null +++ b/lib/CPAN/Exception/blocked_urllist.pm @@ -0,0 +1,40 @@ +# -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- +# vim: ts=4 sts=4 sw=4: +package CPAN::Exception::blocked_urllist; +use strict; +use overload '""' => "as_string"; + +use vars qw( + $VERSION +); +$VERSION = "1.0"; + + +sub new { + my($class) = @_; + bless {}, $class; +} + +sub as_string { + my($self) = shift; + if ($CPAN::Config->{connect_to_internet_ok}) { + return qq{ + +You have not configured a urllist. Please consider to set it with + + o conf init urllist + +}; + } else { + return qq{ + +You have not configured a urllist and did not allow to connect to the +internet. Please consider to call + + o conf init connect_to_internet_ok urllist + +}; + } +} + +1; |