File: clone.t

package info (click to toggle)
liburi-perl 5.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 948 kB
  • sloc: perl: 3,936; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

use Test::More tests => 2;

use URI::URL ();

my $b = URI::URL->new("http://www/");

my $u1 = URI::URL->new("foo", $b);
my $u2 = $u1->clone;

$u1->base("http://yyy/");

#use Data::Dump; Data::Dump::dump($b, $u1, $u2);

is $u1->abs->as_string, "http://yyy/foo";

is $u2->abs->as_string, "http://www/foo";