فهرست منبع

Replace usage of LWP::Simple with LWP::UserAgent

Daniel Gempesaw 10 سال پیش
والد
کامیت
538e0ed9f1
2فایلهای تغییر یافته به همراه5 افزوده شده و 6 حذف شده
  1. 0 1
      cpanfile
  2. 5 5
      t/03-spec-coverage.t

+ 0 - 1
cpanfile

@@ -39,7 +39,6 @@ requires "warnings" => "0";
 on 'test' => sub {
   requires "File::stat" => "0";
   requires "FindBin" => "0";
-  requires "LWP::Simple" => "0";
   requires "Test::Exception" => "0";
   requires "Test::Fatal" => "0";
   requires "Test::LWP::UserAgent" => "0";

+ 5 - 5
t/03-spec-coverage.t

@@ -1,19 +1,19 @@
 #!perl
+
 use strict;
 use warnings;
 
+use LWP::UserAgent;
+use Selenium::Remote::Commands;
 use Test::More;
 
 unless($ENV{RELEASE_TESTING}) {
   plan(skip_all=>"Author tests not required for installation.");
 }
 
-eval {use LWP::Simple;};
-plan skip_all => "need LWP::Simple" if $@;
-use Selenium::Remote::Commands;
-
 my $uri  = "http://selenium.googlecode.com/svn/wiki/JsonWireProtocol.wiki";
-my $data = get($uri);
+my $ua = LWP::UserAgent->new;
+my $data = $ua->get($uri)->content;
 plan skip_all => "need internet connection to run spec test" if !$data;
 
 my $todo_list = {