SCIENTIFIC-LINUX-USERS Archives

April 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jan Iven <[log in to unmask]>
Reply To:
Date:
Wed, 16 Apr 2008 18:20:15 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
On 16/04/08 16:14, John Summerfield wrote:
> Eva Myers wrote:
>> Hello,
>> I am trying to use the Perl script w3mir (from
>> http://www.langfeldt.net/w3mir/) but although it works fine on an SL44
>> system, it has problems on the SL50 64-bit system where I want to use
>> it.  When I investigated this I discovered a difference in Perl's
>> behaviour on SL44 and SL50.  The following test script:
>>
>> #!/usr/bin/perl
>> use URI::URL;
>> $name = (url "file:index.html")->unix_path;
>> print "$name\n";
>>
>> gives the output "index.html" on SL44, which is the behaviour w3mir is
>> expecting, but on SL50 it gives "/index.html" instead.
>>
>> What is going on here, and is there any way I can get Perl in SL50 to
>> behave as it used to in SL44?
> 
> I'm thinking the url should be "file:///index.html."
> Yep, three slashes. I presume there's a space there for a meaningless 
> hostname.
(yes. /// is //localhost/ for file: URLs. 
http://www.rfc-editor.org/rfc/rfc1738.txt. looks like "file:foo" is 
simply invalid - "foo" would be a "relative" reference (viz an 
established context), file:///foo an absolute with "authority"= localhost)

See the perl-URI "Changes" file:

2004-09-07   Gisle Aas <[log in to unmask]>

    Release 1.32

    Introduce $URI::file::DEFAULT_AUTHORITY which control what
    authority string to use for absolute file URIs.  Its value
    default to "" which produce file URIs that better interoperates
    with other implementations.  The old mapping behaviour can be
    requested by setting this variable to undef.

SL4 had perl-URI-1.30, SL5 has perl-URI-1.35 - so this fits. Perhaps 
experimenting with this variable will give you back the old behaviour?

ATOM RSS1 RSS2