Changeset 25665

Show
Ignore:
Timestamp:
12/02/08 13:09:04 (5 weeks ago)
Author:
miyagawa
Message:

drop localhost

Location:
lang/perl/Path-Class-URI/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Path-Class-URI/trunk/lib/Path/Class/URI.pm

    r25575 r25665  
    2424    my $self = shift; 
    2525    if ($self->is_absolute) { 
    26         return URI->new("file://localhost" . $self->as_foreign('Unix')); 
     26        return URI->new("file://" . $self->as_foreign('Unix')); 
    2727    } else { 
    2828        return URI->new("file:" . $self->as_foreign('Unix')); 
     
    5555  my $uri  = $file->uri; # file:bob/john.txt 
    5656 
    57   file('', 'tmp', 'bar.txt')->uri; # file://localhost/tmp/bar.txt 
     57  file('', 'tmp', 'bar.txt')->uri; # file:///tmp/bar.txt 
    5858 
    59   my $file = file_from_uri("file://localhost/tmp/bar.txt"); # or URI::file object 
     59  my $file = file_from_uri("file:///tmp/bar.txt"); # or URI::file object 
    6060  $fh = $file->open; 
    6161 
  • lang/perl/Path-Class-URI/trunk/lib/Path/Class/Unicode.pm

    r25664 r25665  
    4242    my $path = Encode::encode_utf8($self->{path}->as_foreign('Unix')->stringify); 
    4343    if ($self->is_absolute) { 
    44         return URI->new("file://localhost$path"); 
     44        return URI->new("file://$path"); 
    4545    } else { 
    4646        return URI->new("file:$path"); 
     
    110110  my $fn   = "\x{55ed}.txt"; 
    111111  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) 
    113113 
    114114  my $fh   = ufile_from_uri($uri)->open; 
  • lang/perl/Path-Class-URI/trunk/t/01_base.t

    r25544 r25665  
    2929/path/foo/\xe5\x97\xad.txt 
    3030--- expected 
    31 file://localhost/path/foo/%E5%97%AD.txt 
     31file:///path/foo/%E5%97%AD.txt 
  • lang/perl/Path-Class-URI/trunk/t/02_unicode.t

    r25574 r25665  
    3939/path/foo/\x{30c6}\x{30b9}\x{30c8}.txt 
    4040--- expected 
    41 file://localhost/path/foo/%E3%83%86%E3%82%B9%E3%83%88.txt 
     41file:///path/foo/%E3%83%86%E3%82%B9%E3%83%88.txt 
    4242--- local_utf8 
    4343\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88.txt