Commit | Line | Data |
270d1e39 |
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 | |
99804bbb |
34 | sub devnull { |
35 | return "/dev/nul"; |
36 | } |
37 | |
270d1e39 |
38 | 1; |
39 | __END__ |
40 | |
41 | =head1 NAME |
42 | |
43 | File::Spec::OS2 - methods for OS/2 file specs |
44 | |
45 | =head1 SYNOPSIS |
46 | |
47 | use File::Spec::OS2; # Done internally by File::Spec if needed |
48 | |
49 | =head1 DESCRIPTION |
50 | |
51 | See File::Spec::Unix for a documentation of the methods provided |
52 | there. This package overrides the implementation of these methods, not |
53 | the semantics. |
54 | |
55 | =cut |