Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created August 18, 2008 18:56
Show Gist options
  • Save miyagawa/6062 to your computer and use it in GitHub Desktop.
Save miyagawa/6062 to your computer and use it in GitHub Desktop.
Index: t/simple.t
===================================================================
--- t/simple.t (revision 71)
+++ t/simple.t (working copy)
@@ -4,10 +4,12 @@
use CGI;
use IO::Capture::Stdout;
use Test::More;
-eval 'use CPAN::Mini::Webserver;
-my $server = CPAN::Mini::Webserver->new();
-$server->after_setup_listener;
-';
+use CPAN::Mini::Webserver;
+
+eval {
+ my $server = CPAN::Mini::Webserver->new();
+ $server->after_setup_listener;
+};
if ( $@ =~ /Please set up minicpan/ ) {
plan skip_all => "CPAN::Mini mirror must be installed for testing: $@";
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment