On Mon, Dec 24, 2001 at 06:35:26PM +0000, Tanner Family wrote:
> Hacking around with trying to use dirname on a riscos filename, I've noted
> the following:
> 
> 1/ RISCOS::Filespec::convert appears to be returning 1 when using riscos
> filenames (judging by paths taken @ around lines 71 & 243 of
> File.Basename/pm)

I'm not convinced you mean 71 (or I'm not seeing what you see), but 243
makes sense.
RISCOS::Filespec::convert should be returning 1 when conversion to/from
Unix is on (the run time default) and 0 when using RISC OS filenames.
[with use RISCOS; being the easiest way to switch to using RISC OS filenames]

> 2/ The split for dirpath & basename is inccorrect

This expression?
($dirpath,$basename) = ($fullname =~ /(.*[:\.])?(.*)/);

Can you give examples of paths it's getting wrong?
What should it be?

> 3/ The check to see if running RISCOS with unix conversion should be
> rearranged a little so the check & reset of fstype is done but the else
> clause isn't. Replacement code as follows:

It seems I'd come to the same conclusion. I think you've got a
File::Basename dated April 1999. I found that I had modified a version
dated July 1999 with a functionally similar change, which is (buried) in
the source114 file on http://www.ccl4.org/~nick/P/

(which should be linked to from http://www.unfortu.net/~nick/ )

I've attaced the newer File::Basename. Does the check in it do what you were
expecting now?


> PS Are there any plans for releasing perl 5.6 for Risc OS?

I don't have any plans for the 5.6 series. I don't like the 5.6 series.
[This doesn't block anyone else releasing a port of 5.6 for RISC OS]

I'm currently not using RISC OS much, so I have no direct motivation to
port to RISC OS, and a lot of "distraction" working on bits of the perl core
for the upcoming 5.8.

(Which given time, I would like to have ported to RISC OS. "like to have" in
that again I'd be happy to see a port independant of who did the porting)

A newer 5.005_03 port release with any minor tidy ups) is more likely.

Nicholas Clark

Attachment: Basename.pm
Description: Perl program

Reply via email to