devnull() support from Jan Dubois <jan.dubois@ibm.net> and others
[p5sagit/p5-mst-13.2.git] / lib / File / Spec / OS2.pm
CommitLineData
270d1e39 1package File::Spec::OS2;
2
3#use Config;
4#use Cwd;
5#use File::Basename;
6use strict;
7require Exporter;
8
9use File::Spec;
10use vars qw(@ISA);
11
12Exporter::import('File::Spec',
13 qw( $Verbose));
14
15@ISA = qw(File::Spec::Unix);
16
17$ENV{EMXSHELL} = 'sh'; # to run `commands`
18
19sub file_name_is_absolute {
20 my($self,$file) = @_;
21 $file =~ m{^([a-z]:)?[\\/]}i ;
22}
23
24sub 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 34sub devnull {
35 return "/dev/nul";
36}
37
270d1e39 381;
39__END__
40
41=head1 NAME
42
43File::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
51See File::Spec::Unix for a documentation of the methods provided
52there. This package overrides the implementation of these methods, not
53the semantics.
54
55=cut