summaryrefslogtreecommitdiff
path: root/cpan/lib/File/Spec/OS2.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-03-09 04:59:12 +0000
committerfukachan <fukachan>2001-03-09 04:59:12 +0000
commit27bc8adf6f8a05a4c0f47a2b77abd05ab5bb9ba7 (patch)
treee47c614bc9df5b079ab0a32ad517294e10969695 /cpan/lib/File/Spec/OS2.pm
parenta3d4f00869d3f1a2377599198245f90502919504 (diff)
downloadfml8-27bc8adf6f8a05a4c0f47a2b77abd05ab5bb9ba7.tar.gz
fml8-27bc8adf6f8a05a4c0f47a2b77abd05ab5bb9ba7.tar.bz2
fml8-27bc8adf6f8a05a4c0f47a2b77abd05ab5bb9ba7.zip
Initial revision
Diffstat (limited to 'cpan/lib/File/Spec/OS2.pm')
-rw-r--r--cpan/lib/File/Spec/OS2.pm51
1 files changed, 51 insertions, 0 deletions
diff --git a/cpan/lib/File/Spec/OS2.pm b/cpan/lib/File/Spec/OS2.pm
new file mode 100644
index 00000000..d6026177
--- /dev/null
+++ b/cpan/lib/File/Spec/OS2.pm
@@ -0,0 +1,51 @@
+package File::Spec::OS2;
+
+#use Config;
+#use Cwd;
+#use File::Basename;
+use strict;
+require Exporter;
+
+use File::Spec;
+use vars qw(@ISA);
+
+Exporter::import('File::Spec',
+ qw( $Verbose));
+
+@ISA = qw(File::Spec::Unix);
+
+$ENV{EMXSHELL} = 'sh'; # to run `commands`
+
+sub file_name_is_absolute {
+ my($self,$file) = @_;
+ $file =~ m{^([a-z]:)?[\\/]}i ;
+}
+
+sub path {
+ my($self) = @_;
+ my $path_sep = ";";
+ my $path = $ENV{PATH};
+ $path =~ s:\\:/:g;
+ my @path = split $path_sep, $path;
+ foreach(@path) { $_ = '.' if $_ eq '' }
+ @path;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+File::Spec::OS2 - methods for OS/2 file specs
+
+=head1 SYNOPSIS
+
+ use File::Spec::OS2; # Done internally by File::Spec if needed
+
+=head1 DESCRIPTION
+
+See File::Spec::Unix for a documentation of the methods provided
+there. This package overrides the implementation of these methods, not
+the semantics.
+
+=cut