This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix PathTools taint handling for Perl 5.6
[perl5.git] / dist / PathTools / lib / File / Spec / AmigaOS.pm
CommitLineData
36f66789
AB
1package File::Spec::AmigaOS;
2
3use strict;
4use vars qw(@ISA $VERSION);
5require File::Spec::Unix;
6
2ba334c7 7$VERSION = '3.68';
4f642d62 8$VERSION =~ tr/_//d;
36f66789
AB
9
10@ISA = qw(File::Spec::Unix);
11
12=head1 NAME
13
14File::Spec::AmigaOS - File::Spec for AmigaOS
15
16=head1 SYNOPSIS
17
e46aa1dd
KW
18 require File::Spec::AmigaOS; # Done automatically by File::Spec
19 # if needed
36f66789
AB
20
21=head1 DESCRIPTION
22
23Methods for manipulating file specifications.
24
25=head1 METHODS
26
27=over 2
28
29=item tmpdir
30
31Returns $ENV{TMPDIR} or if that is unset, "/t".
32
33=cut
34
35my $tmpdir;
36sub tmpdir {
37 return $tmpdir if defined $tmpdir;
38 $tmpdir = $_[0]->_tmpdir( $ENV{TMPDIR}, "/t" );
39}
40
41=item file_name_is_absolute
42
43Returns true if there's a colon in the file name,
44or if it begins with a slash.
45
46=cut
47
48sub 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
58All the other methods are from L<File::Spec::Unix>.
59
60=cut
61
621;