diff options
author | Olaf Alders <olaf@wundersolutions.com> | 2021-01-12 23:09:21 -0500 |
---|---|---|
committer | Olaf Alders <olaf@wundersolutions.com> | 2021-01-13 09:40:02 -0500 |
commit | 4ae14b130afa39ca9d395d34b0a758f6d4af43cd (patch) | |
tree | 0ddd33697ddd16b01d152c349f3d8977db5dbd9b | |
parent | 091356cf1474689b0fad9363799f6a60621cdb96 (diff) | |
download | uri-oalder/tidy-imports.tar.gz |
Tidy import statementsoalder/tidy-imports
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | lib/URI/WithBase.pm | 4 | ||||
-rw-r--r-- | lib/URI/_idna.pm | 2 | ||||
-rw-r--r-- | lib/URI/data.pm | 4 | ||||
-rw-r--r-- | lib/URI/file/Base.pm | 2 | ||||
-rw-r--r-- | lib/URI/ldapi.pm | 2 | ||||
-rw-r--r-- | lib/URI/sip.pm | 2 | ||||
-rw-r--r-- | t/abs.t | 2 | ||||
-rw-r--r-- | t/clone.t | 2 | ||||
-rw-r--r-- | t/data.t | 2 | ||||
-rw-r--r-- | t/escape-char.t | 2 | ||||
-rw-r--r-- | t/escape.t | 8 | ||||
-rw-r--r-- | t/ftp.t | 2 | ||||
-rw-r--r-- | t/generic.t | 2 | ||||
-rw-r--r-- | t/gopher.t | 2 | ||||
-rw-r--r-- | t/heuristic.t | 4 | ||||
-rw-r--r-- | t/http.t | 2 | ||||
-rw-r--r-- | t/iri.t | 4 | ||||
-rw-r--r-- | t/ldap.t | 2 | ||||
-rw-r--r-- | t/mailto.t | 2 | ||||
-rw-r--r-- | t/mix.t | 4 | ||||
-rw-r--r-- | t/mms.t | 2 | ||||
-rw-r--r-- | t/news.t | 2 | ||||
-rw-r--r-- | t/num_eq.t | 2 | ||||
-rw-r--r-- | t/old-base.t | 2 | ||||
-rw-r--r-- | t/old-relbase.t | 2 | ||||
-rw-r--r-- | t/pop.t | 2 | ||||
-rw-r--r-- | t/punycode.t | 2 | ||||
-rw-r--r-- | t/query-param.t | 2 | ||||
-rw-r--r-- | t/rel.t | 2 | ||||
-rw-r--r-- | t/rfc2732.t | 2 | ||||
-rw-r--r-- | t/roy-test.t | 4 | ||||
-rw-r--r-- | t/rsync.t | 2 | ||||
-rw-r--r-- | t/rtsp.t | 2 | ||||
-rw-r--r-- | t/scheme-exceptions.t | 2 | ||||
-rw-r--r-- | t/sip.t | 2 | ||||
-rw-r--r-- | t/sort-hash-query-form.t | 2 | ||||
-rw-r--r-- | t/split.t | 2 | ||||
-rw-r--r-- | t/urn-isbn.t | 2 | ||||
-rw-r--r-- | t/urn-oid.t | 2 | ||||
-rw-r--r-- | t/utf8.t | 4 |
41 files changed, 48 insertions, 53 deletions
@@ -1,6 +1,7 @@ Revision history for URI {{$NEXT}} + - Tidy import statements (GH#80) (Olaf Alders) 5.05 2020-10-21 13:00:44Z - Bump all versions to 5.05 in order to remove various version mismatches. diff --git a/lib/URI/WithBase.pm b/lib/URI/WithBase.pm index 92321db..0f03ded 100644 --- a/lib/URI/WithBase.pm +++ b/lib/URI/WithBase.pm @@ -3,8 +3,8 @@ package URI::WithBase; use strict; use warnings; -use URI; -use Scalar::Util 'blessed'; +use URI (); +use Scalar::Util qw(blessed); our $VERSION = '5.06'; diff --git a/lib/URI/_idna.pm b/lib/URI/_idna.pm index 0798d01..e4f734a 100644 --- a/lib/URI/_idna.pm +++ b/lib/URI/_idna.pm @@ -6,7 +6,7 @@ package URI::_idna; use strict; use warnings; -use URI::_punycode qw(encode_punycode decode_punycode); +use URI::_punycode qw(decode_punycode encode_punycode); use Carp qw(croak); our $VERSION = '5.06'; diff --git a/lib/URI/data.pm b/lib/URI/data.pm index d0db011..a262fa6 100644 --- a/lib/URI/data.pm +++ b/lib/URI/data.pm @@ -7,8 +7,8 @@ use parent 'URI'; our $VERSION = '5.06'; -use MIME::Base64 qw(encode_base64 decode_base64); -use URI::Escape qw(uri_unescape); +use MIME::Base64 qw(decode_base64 encode_base64); +use URI::Escape qw(uri_unescape); sub media_type { diff --git a/lib/URI/file/Base.pm b/lib/URI/file/Base.pm index 2b9ee49..23cfc82 100644 --- a/lib/URI/file/Base.pm +++ b/lib/URI/file/Base.pm @@ -3,7 +3,7 @@ package URI::file::Base; use strict; use warnings; -use URI::Escape qw(); +use URI::Escape (); our $VERSION = '5.06'; diff --git a/lib/URI/ldapi.pm b/lib/URI/ldapi.pm index 42ec8c9..72d3756 100644 --- a/lib/URI/ldapi.pm +++ b/lib/URI/ldapi.pm @@ -7,7 +7,7 @@ our $VERSION = '5.06'; use parent qw(URI::_ldap URI::_generic); -require URI::Escape; +use URI::Escape (); sub un_path { my $self = shift; diff --git a/lib/URI/sip.pm b/lib/URI/sip.pm index 51f1045..85ca99d 100644 --- a/lib/URI/sip.pm +++ b/lib/URI/sip.pm @@ -12,7 +12,7 @@ use warnings; use parent qw(URI::_server URI::_userpass); -use URI::Escape qw(uri_unescape); +use URI::Escape (); our $VERSION = '5.06'; @@ -6,7 +6,7 @@ print "1..45\n"; # This test the resolution of abs path for all examples given # in the "Uniform Resource Identifiers (URI): Generic Syntax" document. -use URI; +use URI (); my $base = "http://a/b/c/d;p?q"; my $testno = 1; my @rel_fail; @@ -3,7 +3,7 @@ use warnings; print "1..2\n"; -use URI::URL; +use URI::URL (); my $b = URI::URL->new("http://www/"); @@ -3,7 +3,7 @@ use warnings; print "1..22\n"; -use URI; +use URI (); my $u = URI->new("data:,A%20brief%20note"); print "not " unless $u->scheme eq "data" && $u->opaque eq ",A%20brief%20note"; diff --git a/t/escape-char.t b/t/escape-char.t index b03e43d..c6ce79c 100644 --- a/t/escape-char.t +++ b/t/escape-char.t @@ -4,7 +4,7 @@ use warnings; # see https://rt.cpan.org/Ticket/Display.html?id=96941 use Test::More; -use URI; +use URI (); TODO: { my $str = "http://foo/\xE9"; @@ -3,7 +3,7 @@ use warnings; use Test::More tests => 12; -use URI::Escape; +use URI::Escape qw(%escapes uri_escape uri_escape_utf8 uri_unescape); is uri_escape("|abcå"), "%7Cabc%E5"; @@ -19,14 +19,8 @@ is uri_unescape("%7Cabc%e5"), "|abcå"; is_deeply [uri_unescape("%40A%42", "CDE", "F%47H")], [qw(@AB CDE FGH)]; - -use URI::Escape qw(%escapes); - is $escapes{"%"}, "%25"; - -use URI::Escape qw(uri_escape_utf8); - is uri_escape_utf8("|abcå"), "%7Cabc%C3%A5"; skip "Perl 5.8.0 or higher required", 3 if $] < 5.008; @@ -3,7 +3,7 @@ use warnings; print "1..13\n"; -use URI; +use URI (); my $uri; $uri = URI->new("ftp://ftp.example.com/path"); diff --git a/t/generic.t b/t/generic.t index e2f7b97..4885ced 100644 --- a/t/generic.t +++ b/t/generic.t @@ -3,7 +3,7 @@ use warnings; print "1..48\n"; -use URI; +use URI (); my $foo = URI->new("Foo:opaque#frag"); @@ -3,7 +3,7 @@ use warnings; print "1..48\n"; -use URI; +use URI (); my $t = 1; sub is { diff --git a/t/heuristic.t b/t/heuristic.t index 63c2ad8..e64c338 100644 --- a/t/heuristic.t +++ b/t/heuristic.t @@ -15,7 +15,7 @@ BEGIN { print "1..26\n"; -use URI::Heuristic qw(uf_urlstr uf_url); +use URI::Heuristic qw(uf_url uf_urlstr); if (shift) { $URI::Heuristic::DEBUG++; open(STDERR, ">&STDOUT"); # redirect STDERR @@ -59,7 +59,7 @@ print "ok 5\n"; print "not " unless uf_urlstr("perl/camel.gif") =~ m,^http://www\.perl\.(org|co)\.uk/camel\.gif$,; print "ok 6\n"; - use Net::Domain; + use Net::Domain (); $ENV{LC_ALL} = "C"; { no warnings; *Net::Domain::hostfqdn = sub { return 'vasya.su' } } undef $URI::Heuristic::MY_COUNTRY; @@ -3,7 +3,7 @@ use warnings; print "1..16\n"; -use URI; +use URI (); my $u = URI->new("<http://www.perl.com/path?q=fôo>"); @@ -3,7 +3,7 @@ use warnings; use utf8; use Test::More; -use Config; +use Config qw(%Config); if (defined $Config{useperlio}) { plan tests=>26; @@ -11,7 +11,7 @@ if (defined $Config{useperlio}) { plan skip_all=>'this perl doesn\'t support PerlIO layers'; } -use URI; +use URI (); use URI::IRI; my $u; @@ -3,7 +3,7 @@ use warnings; print "1..24\n"; -use URI; +use URI (); my $uri; @@ -3,7 +3,7 @@ use warnings; print "1..7\n"; -use URI; +use URI (); my $u = URI->new('mailto:gisle@aas.no'); @@ -4,9 +4,9 @@ use warnings; print "1..6\n"; # Test mixing of URI and URI::WithBase objects -use URI; +use URI (); use URI::WithBase; -use URI::URL; +use URI::URL (); my $str = "http://www.sn.no/"; my $rel = "path/img.gif"; @@ -3,7 +3,7 @@ use warnings; print "1..8\n"; -use URI; +use URI (); my $u = URI->new("<mms://66.250.188.13/KFOG_FM>"); @@ -3,7 +3,7 @@ use warnings; print "1..7\n"; -use URI; +use URI (); my $u = URI->new("news:comp.lang.perl.misc"); @@ -5,7 +5,7 @@ use strict; use warnings; use Test::More 'no_plan'; -use URI; +use URI (); my $uri1 = URI->new("http://foo.com"); my $uri2 = URI->new("http://foo.com"); diff --git a/t/old-base.t b/t/old-base.t index 984aab1..706051a 100644 --- a/t/old-base.t +++ b/t/old-base.t @@ -4,7 +4,7 @@ use warnings; use Test::More 0.96; use URI::URL qw(url); use URI::Escape qw(uri_escape uri_unescape); -use File::Temp 'tempdir'; +use File::Temp qw(tempdir); # want compatibility use URI::file; diff --git a/t/old-relbase.t b/t/old-relbase.t index 3bd0ae8..ae76a1d 100644 --- a/t/old-relbase.t +++ b/t/old-relbase.t @@ -3,7 +3,7 @@ use warnings; print "1..5\n"; -use URI::URL; +use URI::URL qw(url); # We used to have problems with URLs that used a base that was # not absolute itself. @@ -3,7 +3,7 @@ use warnings; print "1..8\n"; -use URI; +use URI (); my $u = URI->new('pop://aas@pop.sn.no'); diff --git a/t/punycode.t b/t/punycode.t index d1e3084..36d8e96 100644 --- a/t/punycode.t +++ b/t/punycode.t @@ -3,7 +3,7 @@ use warnings; use utf8; use Test::More tests => 15; -use URI::_punycode qw(encode_punycode decode_punycode); +use URI::_punycode qw(decode_punycode encode_punycode); my %RFC_3492 = ( A => { diff --git a/t/query-param.t b/t/query-param.t index fc852c0..473b290 100644 --- a/t/query-param.t +++ b/t/query-param.t @@ -3,7 +3,7 @@ use warnings; use Test::More tests => 19; -use URI; +use URI (); use URI::QueryParam; my $u = URI->new("http://www.sol.no?foo=4&bar=5&foo=5"); @@ -5,7 +5,7 @@ use Test::More; plan tests => 6; -use URI; +use URI (); my $uri; diff --git a/t/rfc2732.t b/t/rfc2732.t index d69960a..2b0fa5b 100644 --- a/t/rfc2732.t +++ b/t/rfc2732.t @@ -5,7 +5,7 @@ use warnings; use Test::More tests => 19; -use URI; +use URI (); my $uri = URI->new("http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html"); is $uri->as_string, "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html"; diff --git a/t/roy-test.t b/t/roy-test.t index a7a9fdc..db06c26 100644 --- a/t/roy-test.t +++ b/t/roy-test.t @@ -1,10 +1,10 @@ use strict; use warnings; -use Test qw(plan ok); +use Test qw(ok plan); plan tests => 102; -use URI; +use URI (); use File::Spec::Functions qw(catfile); my $no = 1; @@ -3,7 +3,7 @@ use warnings; print "1..4\n"; -use URI; +use URI (); my $u = URI->new('rsync://gisle@perl.com/foo/bar'); @@ -3,7 +3,7 @@ use warnings; print "1..9\n"; -use URI; +use URI (); my $u = URI->new("<rtsp://media.perl.com/fôo.smi/>"); diff --git a/t/scheme-exceptions.t b/t/scheme-exceptions.t index 82740be..e1cb568 100644 --- a/t/scheme-exceptions.t +++ b/t/scheme-exceptions.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::More; -use URI; +use URI (); plan skip_all => 'this test assumes that URI::javascript does not exist' if eval { +require URI::javascript }; @@ -3,7 +3,7 @@ use warnings; print "1..11\n"; -use URI; +use URI (); my $u = URI->new('sip:phone@domain.ext'); print "not " unless $u->user eq 'phone' && diff --git a/t/sort-hash-query-form.t b/t/sort-hash-query-form.t index 7c6f896..b79a4b7 100644 --- a/t/sort-hash-query-form.t +++ b/t/sort-hash-query-form.t @@ -5,7 +5,7 @@ use Test::More; # ABSTRACT: Make sure query_form(\%hash) is sorted -use URI; +use URI (); my $base = URI->new('http://example.org/'); @@ -3,7 +3,7 @@ use warnings; print "1..17\n"; -use URI::Split qw(uri_split uri_join); +use URI::Split qw(uri_join uri_split); sub j { join("-", map { defined($_) ? $_ : "<undef>" } @_) } diff --git a/t/urn-isbn.t b/t/urn-isbn.t index f512bde..18136ef 100644 --- a/t/urn-isbn.t +++ b/t/urn-isbn.t @@ -5,7 +5,7 @@ use Test::Needs 'Business::ISBN'; print "1..13\n"; -use URI; +use URI (); my $u = URI->new("URN:ISBN:0395363411"); print "not " unless $u eq "URN:ISBN:0395363411" && diff --git a/t/urn-oid.t b/t/urn-oid.t index d35e524..8298749 100644 --- a/t/urn-oid.t +++ b/t/urn-oid.t @@ -3,7 +3,7 @@ use warnings; print "1..4\n"; -use URI; +use URI (); my $u = URI->new("urn:oid"); @@ -4,7 +4,7 @@ use warnings; use utf8; use Test::More 'no_plan'; -use URI; +use URI (); is(URI->new('http://foobar/mooi€e')->as_string, 'http://foobar/mooi%E2%82%ACe'); @@ -14,7 +14,7 @@ is( $uri->query, "mooi%E2%82%ACe=mooi%E2%82%ACe" ); is( ($uri->query_form)[1], "mooi\xE2\x82\xACe" ); # RT#70161 -use Encode; +use Encode qw(decode_utf8); $uri = URI->new(decode_utf8 '?Query=%C3%A4%C3%B6%C3%BC'); is( ($uri->query_form)[1], "\xC3\xA4\xC3\xB6\xC3\xBC"); is( decode_utf8(($uri->query_form)[1]), 'äöü'); |