From 512e1353c90135f2f86b8e9e0540d4f90ecc6215 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 14 Apr 2009 00:21:05 -0500 Subject: [PATCH] Add file missed in previous commit. --- lib/CPAN/Exception/blocked_urllist.pm | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 lib/CPAN/Exception/blocked_urllist.pm 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; -- 1.8.3.1