RISC OS & Unix filenames

[email protected] (Tanner Family) Mon, 24 Dec 2001 18:35:26 +0000 (GMT)
Newsgroups perl.riscos
Message-ID <[email protected]>
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)

2/ The split for dirpath & basename is inccorrect

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:

  if ($fstype =~ /^RISCOS/i) {
      if (!defined &RISCOS::Filespec::convert
          || !&RISCOS::Filespec::convert()) { # HACK!
        # Don't have the function, or don't have conversion on - Unix
emulation
        $fstype = '';
      }
  }
  if ($fstype =~ /^RISCOS/i) {
        ($dirpath,$basename) = ($fullname =~ /((?:.*::)?(?:.*\.)*)?(.*)/);
        $dirpath = '@.' unless $dirpath;
  }
  elsif ($fstype =~ /^MS(DOS|Win32)/i) {

4/ Similarly for dirname

Cheers

Tom

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

Regards
Thos
-- 
T. R. Tanner    email: [email protected]
                web page: http://www.argonet.co.uk/users/ttehtann
Warning: Here be random taglines!

.... 'Windows'. wipes away those stubborn BBS's !