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