You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The two-argument constructor setting the scheme part of an URL doesn't work (anymore?) as shown in the synopsis, see the attached test.
Due to the deep inheritance tree, I didn't find out where the scheme information gets lost, but either the synopsis should be amended or specifying the scheme in the constructor should be made to work again.
Thanks!
#!perluse strict;
use warnings;
use Test::More tests=> 2;
use URI;
my$uri = URI->new('example', 'example-scheme');
is $uri->scheme, 'example-scheme';
# Also test the synopsis:my$u2 = URI->new("foo", "http");
is $u2->scheme, 'http';
I can't actually find a tag from the last 10 years where this works. It looks like it's creating the right class based on the supplied scheme, but sub _scheme is not dealing with this.
#!perluse strict;
use warnings;
use Test::More tests=> 4;
use URI;
my$uri = URI->new('example', 'example-scheme');
is $uri->scheme, 'example-scheme';
is ref$uri, 'URI::_foreign', 'is URI::_foreign';
# Also test the synopsis:my$u2 = URI->new("foo", "http");
is $u2->scheme, 'http';
is ref$u2, 'URI::http', 'is URI::http';
The two-argument constructor setting the
scheme
part of an URL doesn't work (anymore?) as shown in the synopsis, see the attached test.Due to the deep inheritance tree, I didn't find out where the scheme information gets lost, but either the synopsis should be amended or specifying the scheme in the constructor should be made to work again.
Thanks!
uri-scheme.t.txt
The text was updated successfully, but these errors were encountered: