Skip to content

URI->new('foo', 'http') doesn't set the scheme #88

@Corion

Description

@Corion

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!

#!perl
use 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';

uri-scheme.t.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions