Changeset 25665
- Timestamp:
- 12/02/08 13:09:04 (5 weeks ago)
- Location:
- lang/perl/Path-Class-URI/trunk
- Files:
-
- 4 modified
-
lib/Path/Class/URI.pm (modified) (2 diffs)
-
lib/Path/Class/Unicode.pm (modified) (2 diffs)
-
t/01_base.t (modified) (1 diff)
-
t/02_unicode.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Path-Class-URI/trunk/lib/Path/Class/URI.pm
r25575 r25665 24 24 my $self = shift; 25 25 if ($self->is_absolute) { 26 return URI->new("file:// localhost" . $self->as_foreign('Unix'));26 return URI->new("file://" . $self->as_foreign('Unix')); 27 27 } else { 28 28 return URI->new("file:" . $self->as_foreign('Unix')); … … 55 55 my $uri = $file->uri; # file:bob/john.txt 56 56 57 file('', 'tmp', 'bar.txt')->uri; # file:// localhost/tmp/bar.txt57 file('', 'tmp', 'bar.txt')->uri; # file:///tmp/bar.txt 58 58 59 my $file = file_from_uri("file:// localhost/tmp/bar.txt"); # or URI::file object59 my $file = file_from_uri("file:///tmp/bar.txt"); # or URI::file object 60 60 $fh = $file->open; 61 61 -
lang/perl/Path-Class-URI/trunk/lib/Path/Class/Unicode.pm
r25664 r25665 42 42 my $path = Encode::encode_utf8($self->{path}->as_foreign('Unix')->stringify); 43 43 if ($self->is_absolute) { 44 return URI->new("file:// localhost$path");44 return URI->new("file://$path"); 45 45 } else { 46 46 return URI->new("file:$path"); … … 110 110 my $fn = "\x{55ed}.txt"; 111 111 my $file = ufile("/path", $fn); 112 my $uri = $file->uri; # file:// localhost/path/%E5%97%AD.txt (always utf-8)112 my $uri = $file->uri; # file:///path/%E5%97%AD.txt (always utf-8) 113 113 114 114 my $fh = ufile_from_uri($uri)->open; -
lang/perl/Path-Class-URI/trunk/t/01_base.t
r25544 r25665 29 29 /path/foo/\xe5\x97\xad.txt 30 30 --- expected 31 file:// localhost/path/foo/%E5%97%AD.txt31 file:///path/foo/%E5%97%AD.txt -
lang/perl/Path-Class-URI/trunk/t/02_unicode.t
r25574 r25665 39 39 /path/foo/\x{30c6}\x{30b9}\x{30c8}.txt 40 40 --- expected 41 file:// localhost/path/foo/%E3%83%86%E3%82%B9%E3%83%88.txt41 file:///path/foo/%E3%83%86%E3%82%B9%E3%83%88.txt 42 42 --- local_utf8 43 43 \xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88.txt
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)