home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / !Perl / lib / zip / File / Spec / OS2.pm < prev    next >
Encoding:
Perl POD Document  |  1998-07-30  |  891 b   |  52 lines

  1. package File::Spec::OS2;
  2.  
  3. #use Config;
  4. #use Cwd;
  5. #use File::Basename;
  6. use strict;
  7. require Exporter;
  8.  
  9. use File::Spec;
  10. use vars qw(@ISA);
  11.  
  12. Exporter::import('File::Spec',
  13.        qw( $Verbose));
  14.  
  15. @ISA = qw(File::Spec::Unix);
  16.  
  17. $ENV{EMXSHELL} = 'sh'; # to run `commands`
  18.  
  19. sub file_name_is_absolute {
  20.     my($self,$file) = @_;
  21.     $file =~ m{^([a-z]:)?[\\/]}i ;
  22. }
  23.  
  24. sub path {
  25.     my($self) = @_;
  26.     my $path_sep = ";";
  27.     my $path = $ENV{PATH};
  28.     $path =~ s:\\:/:g;
  29.     my @path = split $path_sep, $path;
  30.     foreach(@path) { $_ = '.' if $_ eq '' }
  31.     @path;
  32. }
  33.  
  34. 1;
  35. __END__
  36.  
  37. =head1 NAME
  38.  
  39. File::Spec::OS2 - methods for OS/2 file specs
  40.  
  41. =head1 SYNOPSIS
  42.  
  43.  use File::Spec::OS2; # Done internally by File::Spec if needed
  44.  
  45. =head1 DESCRIPTION
  46.  
  47. See File::Spec::Unix for a documentation of the methods provided
  48. there. This package overrides the implementation of these methods, not
  49. the semantics.
  50.  
  51. =cut
  52.