xref: /openbsd-src/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/AmigaOS.pm (revision ae3cb403620ab940fbaabb3055fac045a63d56b7)
1package File::Spec::AmigaOS;
2
3use strict;
4use vars qw(@ISA $VERSION);
5require File::Spec::Unix;
6
7$VERSION = '3.64';
8$VERSION =~ tr/_//d;
9
10@ISA = qw(File::Spec::Unix);
11
12=head1 NAME
13
14File::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
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;
63