This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
8d3796e1237ee20f88e4aaa62ed2c09afb99cf8c
[perl5.git] / dist / PathTools / lib / File / Spec / AmigaOS.pm
1 package File::Spec::AmigaOS;
2
3 use strict;
4 use vars qw(@ISA $VERSION);
5 require File::Spec::Unix;
6
7 $VERSION = '3.67';
8 $VERSION =~ tr/_//d;
9
10 @ISA = qw(File::Spec::Unix);
11
12 =head1 NAME
13
14 File::Spec::AmigaOS - File::Spec for AmigaOS
15
16 =head1 SYNOPSIS
17
18  require File::Spec::AmigaOS; # Done automatically by File::Spec
19                               # if needed
20
21 =head1 DESCRIPTION
22
23 Methods for manipulating file specifications.
24
25 =head1 METHODS
26
27 =over 2
28
29 =item tmpdir
30
31 Returns $ENV{TMPDIR} or if that is unset, "/t".
32
33 =cut
34
35 my $tmpdir;
36 sub tmpdir {
37   return $tmpdir if defined $tmpdir;
38   $tmpdir = $_[0]->_tmpdir( $ENV{TMPDIR}, "/t" );
39 }
40
41 =item file_name_is_absolute
42
43 Returns true if there's a colon in the file name,
44 or if it begins with a slash.
45
46 =cut
47
48 sub file_name_is_absolute {
49   my ($self, $file) = @_;
50
51   # Not 100% robust as a "/" must not preceded a ":"
52   # but this cannot happen in a well formed path.
53   return $file =~ m{^/|:}s;
54 }
55
56 =back
57
58 All the other methods are from L<File::Spec::Unix>.
59
60 =cut
61
62 1;