summaryrefslogtreecommitdiff
path: root/Porting/checkURL.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-21 19:14:13 +0100
committerNicholas Clark <nick@ccl4.org>2011-12-22 08:43:31 +0100
commitd4b5f70ab4778c1a32574fd37f08482baecafd66 (patch)
treec739239aa0d0b18a96d455a3dd53d800b7c521ba /Porting/checkURL.pl
parent8f5755bc0b04efd9f62b4ef9b675af81030c1639 (diff)
downloadperl-d4b5f70ab4778c1a32574fd37f08482baecafd66.tar.gz
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<use> 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<require>.
Diffstat (limited to 'Porting/checkURL.pl')
-rwxr-xr-xPorting/checkURL.pl22
1 files changed, 11 insertions, 11 deletions
diff --git a/Porting/checkURL.pl b/Porting/checkURL.pl
index 0e0003bb06..9fb48df913 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};