diff options
author | Olaf Alders <olaf@wundersolutions.com> | 2021-01-29 16:17:32 -0500 |
---|---|---|
committer | Olaf Alders <olaf@wundersolutions.com> | 2021-01-29 17:51:02 -0500 |
commit | 5ffb78e7a4636044bde9ecef356517b5b1602f4d (patch) | |
tree | 6446b052736313068cf0daab803ff35bd3310f82 | |
parent | f4e8c8ce2cfe7c1498f65ee46b5e01db8037a94d (diff) | |
download | uri-5ffb78e7a4636044bde9ecef356517b5b1602f4d.tar.gz |
s/perl.com/example.com/ in examples and tests
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | lib/URI.pm | 8 | ||||
-rw-r--r-- | lib/URI/Heuristic.pm | 2 | ||||
-rw-r--r-- | t/http.t | 20 | ||||
-rw-r--r-- | t/rsync.t | 4 | ||||
-rw-r--r-- | t/rtsp.t | 14 |
6 files changed, 25 insertions, 24 deletions
@@ -1,6 +1,7 @@ Revision history for URI {{$NEXT}} + - s/perl.com/example.com/ in examples and tests (GH#81) (Olaf Alders) 5.06 2021-01-14 16:01:13Z - Tidy import statements (GH#80) (Olaf Alders) @@ -357,13 +357,13 @@ URI - Uniform Resource Identifiers (absolute and relative) =head1 SYNOPSIS - use URI; + use URI (); - $u1 = URI->new("http://www.perl.com"); + $u1 = URI->new("http://www.example.com"); $u2 = URI->new("foo", "http"); $u3 = $u2->abs($u1); $u4 = $u3->clone; - $u5 = URI->new("HTTP://WWW.perl.com:80")->canonical; + $u5 = URI->new("HTTP://WWW.example.com:80")->canonical; $str = $u->as_string; $str = "$u"; @@ -374,7 +374,7 @@ URI - Uniform Resource Identifiers (absolute and relative) $frag = $u->fragment; $u->scheme("ftp"); - $u->host("ftp.perl.com"); + $u->host("ftp.example.com"); $u->path("cpan/"); =head1 DESCRIPTION diff --git a/lib/URI/Heuristic.pm b/lib/URI/Heuristic.pm index 608f6cc..fc11f03 100644 --- a/lib/URI/Heuristic.pm +++ b/lib/URI/Heuristic.pm @@ -7,7 +7,7 @@ URI::Heuristic - Expand URI using heuristics =head1 SYNOPSIS use URI::Heuristic qw(uf_uristr); - $u = uf_uristr("perl"); # http://www.perl.com + $u = uf_uristr("example"); # http://www.example.com $u = uf_uristr("www.sol.no/sol"); # http://www.sol.no/sol $u = uf_uristr("aas"); # http://www.aas.no $u = uf_uristr("ftp.funet.fi"); # ftp://ftp.funet.fi @@ -5,10 +5,10 @@ print "1..16\n"; use URI (); -my $u = URI->new("<http://www.perl.com/path?q=fôo>"); +my $u = URI->new("<http://www.example.com/path?q=fôo>"); #print "$u\n"; -print "not " unless $u eq "http://www.perl.com/path?q=f%F4o"; +print "not " unless $u eq "http://www.example.com/path?q=f%F4o"; print "ok 1\n"; print "not " unless $u->port == 80; @@ -16,19 +16,19 @@ print "ok 2\n"; # play with port my $old = $u->port(8080); -print "not " unless $old == 80 && $u eq "http://www.perl.com:8080/path?q=f%F4o"; +print "not " unless $old == 80 && $u eq "http://www.example.com:8080/path?q=f%F4o"; print "ok 3\n"; $u->port(80); -print "not " unless $u eq "http://www.perl.com:80/path?q=f%F4o"; +print "not " unless $u eq "http://www.example.com:80/path?q=f%F4o"; print "ok 4\n"; $u->port(""); -print "not " unless $u eq "http://www.perl.com:/path?q=f%F4o" && $u->port == 80; +print "not " unless $u eq "http://www.example.com:/path?q=f%F4o" && $u->port == 80; print "ok 5\n"; $u->port(undef); -print "not " unless $u eq "http://www.perl.com/path?q=f%F4o"; +print "not " unless $u eq "http://www.example.com/path?q=f%F4o"; print "ok 6\n"; my @q = $u->query_form; @@ -39,7 +39,7 @@ $u->query_form(foo => "bar", bar => "baz"); print "not " unless $u->query eq "foo=bar&bar=baz"; print "ok 8\n"; -print "not " unless $u->host eq "www.perl.com"; +print "not " unless $u->host eq "www.example.com"; print "ok 9\n"; print "not " unless $u->path eq "/path"; @@ -52,14 +52,14 @@ $u->scheme("https"); print "not " unless $u->port == 443; print "ok 12\n"; -print "not " unless $u eq "https://www.perl.com/path?foo=bar&bar=baz"; +print "not " unless $u eq "https://www.example.com/path?foo=bar&bar=baz"; print "ok 13\n"; print "not " unless $u->secure; print "ok 14\n"; -$u = URI->new("http://%77%77%77%2e%70%65%72%6c%2e%63%6f%6d/%70%75%62/%61/%32%30%30%31/%30%38/%32%37/%62%6a%6f%72%6e%73%74%61%64%2e%68%74%6d%6c"); -print "not " unless $u->canonical eq "http://www.perl.com/pub/a/2001/08/27/bjornstad.html"; +$u = URI->new("http://%65%78%61%6d%70%6c%65%2e%63%6f%6d/%70%75%62/%61/%32%30%30%31/%30%38/%32%37/%62%6a%6f%72%6e%73%74%61%64%2e%68%74%6d%6c"); +print "not " unless $u->canonical eq "http://example.com/pub/a/2001/08/27/bjornstad.html"; print "ok 15\n"; print "not " unless $u->has_recognized_scheme; @@ -5,7 +5,7 @@ print "1..4\n"; use URI (); -my $u = URI->new('rsync://gisle@perl.com/foo/bar'); +my $u = URI->new('rsync://gisle@example.com/foo/bar'); print "not " unless $u->user eq "gisle"; print "ok 1\n"; @@ -18,6 +18,6 @@ print "ok 3\n"; $u->port(8730); -print "not " unless $u eq 'rsync://gisle@perl.com:8730/foo/bar'; +print "not " unless $u eq 'rsync://gisle@example.com:8730/foo/bar'; print "ok 4\n"; @@ -5,10 +5,10 @@ print "1..9\n"; use URI (); -my $u = URI->new("<rtsp://media.perl.com/fôo.smi/>"); +my $u = URI->new("<rtsp://media.example.com/fôo.smi/>"); #print "$u\n"; -print "not " unless $u eq "rtsp://media.perl.com/f%F4o.smi/"; +print "not " unless $u eq "rtsp://media.example.com/f%F4o.smi/"; print "ok 1\n"; print "not " unless $u->port == 554; @@ -16,22 +16,22 @@ print "ok 2\n"; # play with port my $old = $u->port(8554); -print "not " unless $old == 554 && $u eq "rtsp://media.perl.com:8554/f%F4o.smi/"; +print "not " unless $old == 554 && $u eq "rtsp://media.example.com:8554/f%F4o.smi/"; print "ok 3\n"; $u->port(554); -print "not " unless $u eq "rtsp://media.perl.com:554/f%F4o.smi/"; +print "not " unless $u eq "rtsp://media.example.com:554/f%F4o.smi/"; print "ok 4\n"; $u->port(""); -print "not " unless $u eq "rtsp://media.perl.com:/f%F4o.smi/" && $u->port == 554; +print "not " unless $u eq "rtsp://media.example.com:/f%F4o.smi/" && $u->port == 554; print "ok 5\n"; $u->port(undef); -print "not " unless $u eq "rtsp://media.perl.com/f%F4o.smi/"; +print "not " unless $u eq "rtsp://media.example.com/f%F4o.smi/"; print "ok 6\n"; -print "not " unless $u->host eq "media.perl.com"; +print "not " unless $u->host eq "media.example.com"; print "ok 7\n"; print "not " unless $u->path eq "/f%F4o.smi/"; |