diff options
| author | fukachan <fukachan> | 2018-01-13 08:48:42 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2018-01-13 08:48:42 +0000 |
| commit | 28a388f6aeced7f8dd585a84bde0f0ddf0bb7a69 (patch) | |
| tree | 7fbe3b9fc9209113e15e00fbdf9663ff1f16190d /cpan/lib/File/Spec/AmigaOS.pm | |
| parent | dbab3c94592a2f0ef40175cf39cf89fbe5503c41 (diff) | |
| download | fml8-PathTools-3-62.tar.gz fml8-PathTools-3-62.tar.bz2 fml8-PathTools-3-62.zip | |
import PathTools-3.62PathTools-3-62
Diffstat (limited to 'cpan/lib/File/Spec/AmigaOS.pm')
| -rw-r--r-- | cpan/lib/File/Spec/AmigaOS.pm | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/cpan/lib/File/Spec/AmigaOS.pm b/cpan/lib/File/Spec/AmigaOS.pm new file mode 100644 index 00000000..e6d6f5f2 --- /dev/null +++ b/cpan/lib/File/Spec/AmigaOS.pm @@ -0,0 +1,61 @@ +package File::Spec::AmigaOS; + +use strict; +use vars qw(@ISA $VERSION); +require File::Spec::Unix; + +$VERSION = '3.62'; +$VERSION =~ tr/_//d; + +@ISA = qw(File::Spec::Unix); + +=head1 NAME + +File::Spec::AmigaOS - File::Spec for AmigaOS + +=head1 SYNOPSIS + + require File::Spec::AmigaOS; # Done automatically by File::Spec if needed + +=head1 DESCRIPTION + +Methods for manipulating file specifications. + +=head1 METHODS + +=over 2 + +=item tmpdir + +Returns $ENV{TMPDIR} or if that is unset, "/t". + +=cut + +my $tmpdir; +sub tmpdir { + return $tmpdir if defined $tmpdir; + $tmpdir = $_[0]->_tmpdir( $ENV{TMPDIR}, "/t" ); +} + +=item file_name_is_absolute + +Returns true if there's a colon in the file name, +or if it begins with a slash. + +=cut + +sub file_name_is_absolute { + my ($self, $file) = @_; + + # Not 100% robust as a "/" must not preceded a ":" + # but this cannot happen in a well formed path. + return $file =~ m{^/|:}s; +} + +=back + +All the other methods are from L<File::Spec::Unix>. + +=cut + +1; |
