From: Steve Peters Date: Tue, 14 Apr 2009 05:21:05 +0000 (-0500) Subject: Add file missed in previous commit. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=512e1353c90135f2f86b8e9e0540d4f90ecc6215;p=p5sagit%2Fp5-mst-13.2.git Add file missed in previous commit. --- diff --git a/lib/CPAN/Exception/blocked_urllist.pm b/lib/CPAN/Exception/blocked_urllist.pm new file mode 100644 index 0000000..0df385b --- /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;