Norton Allen <[EMAIL PROTECTED]> writes:

>   I humbly submit the following as a patch to support the
>   slightly unfamiliar nature of full path names under QNX.
>   I would be happy to entertain any suggestions.

It will be in URI-1.05 which I will upload today.
Sorry about the late response.

Regards,
Gisle



>   
>     -Norton Allen
> 
> ----------------------------------------------------------------
> touch URI/file/QNX.pm
> exit 0
> =============
> 
> *** URI-1.04.ORIG/URI/file/QNX.pm     Tue Feb  8 10:20:09 2000
> --- URI-1.04/URI/file/QNX.pm  Tue Feb  8 10:14:02 2000
> ***************
> *** 1,0 ****
> --- 1,18 ----
> + package URI::file::QNX;
> + 
> + require URI::file::Unix;
> + @ISA=qw(URI::file::Unix);
> + 
> + use strict;
> + 
> + sub extract_path
> + {
> +     my($class, $path) = @_;
> +     # tidy path
> +     $path =~ s,(.)//+,$1/,g; # ^// is correct
> +     $path =~ s,(/\.)+/,/,g;
> +     $path = "./$path" if $path =~ m,^[^:/]+:,,; # look like "scheme:"
> +     $path;
> + }
> + 
> + 1;
> *** URI-1.04.ORIG/URI/file.pm Mon Aug  2 18:40:44 1999
> --- URI-1.04/URI/file.pm      Tue Feb  8 10:18:08 2000
> ***************
> *** 16,21 ****
> --- 16,22 ----
>        win32   => "Win32",
>        msdos   => "FAT",
>        dos     => "FAT",
> +      qnx     => "QNX",
>   );
>   
>   sub os_class
> *** URI-1.04.ORIG/t/old-base.t        Thu Jul 22 08:08:12 1999
> --- URI-1.04/t/old-base.t     Tue Feb  8 00:03:09 2000
> ***************
> *** 633,640 ****
>       return 1 if $^O eq "MacOS";
>       
>       print "newlocal_test:\n";
> !     my $pwd = ($^O eq 'MSWin32' ? 'cd' : (-e '/bin/pwd' ? '/bin/pwd' : 'pwd'));
>       my $tmpdir = ($^O eq 'MSWin32' ? $ENV{TEMP} : '/tmp');
>       $tmpdir =~ tr|\\|/|;
>   
>       my $savedir = `$pwd`;     # we don't use Cwd.pm because we want to check
> --- 633,646 ----
>       return 1 if $^O eq "MacOS";
>       
>       print "newlocal_test:\n";
> !     my $pwd = ($^O eq 'MSWin32' ? 'cd' :
> !       ($^O eq 'qnx' ? '/usr/bin/fullpath -t' :
> !         (-e '/bin/pwd' ? '/bin/pwd' : 'pwd')));
>       my $tmpdir = ($^O eq 'MSWin32' ? $ENV{TEMP} : '/tmp');
> +     if ( $^O eq 'qnx' ) {
> +       $tmpdir = `/usr/bin/fullpath -t $tmpdir`;
> +       chomp $tmpdir;
> +     }
>       $tmpdir =~ tr|\\|/|;
>   
>       my $savedir = `$pwd`;     # we don't use Cwd.pm because we want to check
> 

Reply via email to