From d4b5f70ab4778c1a32574fd37f08482baecafd66 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 21 Dec 2011 19:14:13 +0100 Subject: [PATCH] Porting/checkURL.pl now requires rather than uses all non-core modules. This way ./perl -Ilib -c Porting/checkURL.pl can be used to syntax check it. Only File::Slurp and URI::Find::Simple were actually relying on C to import subroutines - replace the two uses with fully qualified names. All other packages are needed for object constructors, not imports, so there is no change in loading them with C. --- Porting/checkURL.pl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Porting/checkURL.pl b/Porting/checkURL.pl index 0e0003b..9fb48df 100755 --- a/Porting/checkURL.pl +++ b/Porting/checkURL.pl @@ -3,16 +3,16 @@ use strict; use warnings; use autodie; use feature qw(say); -use File::Find::Rule; -use File::Slurp; -use File::Spec; -use IO::Socket::SSL; +require File::Find::Rule; +require File::Slurp; +require File::Spec; +require IO::Socket::SSL; use List::Util qw(sum); -use LWP::UserAgent; -use Net::FTP; -use Parallel::Fork::BossWorkerAsync; -use Term::ProgressBar::Simple; -use URI::Find::Simple qw( list_uris ); +require LWP::UserAgent; +require Net::FTP; +require Parallel::Fork::BossWorkerAsync; +require Term::ProgressBar::Simple; +require URI::Find::Simple; $| = 1; my %ignore; @@ -46,8 +46,8 @@ foreach my $filename (@filenames) { next if $filename =~ /\.patch$/; next if $filename =~ 'cpan/Pod-Simple/t/perlfaqo?\.pod'; next if $filename =~ /checkURL\.pl$/; - my $contents = read_file($filename); - my @uris = list_uris($contents); + my $contents = File::Slurp::read_file($filename); + my @uris = URI::Find::Simple::list_uris($contents); foreach my $uri (@uris) { next unless $uri =~ /^(http|ftp)/; next if $ignore{$uri}; -- 2.7.4