UV uv2
PROTOTYPE: $$
PREINIT:
- UV comp;
+ UV composite;
CODE:
- comp = composite_uv(uv, uv2);
- RETVAL = comp ? newSVuv(comp) : &PL_sv_undef;
+ composite = composite_uv(uv, uv2);
+ RETVAL = composite ? newSVuv(composite) : &PL_sv_undef;
OUTPUT:
RETVAL
$Too_Big = 1024 * 1024 * 2;
+my $macfiles;
+if ($^O eq 'MacOS') {
+ $macfiles = eval { require Mac::MoreFiles };
+ warn 'Mac::MoreFiles could not be loaded; using non-native syscopy'
+ if $^W;
+}
+
sub _catname {
my($from, $to) = @_;
if (not defined &basename) {
return 0 unless @_ == 2;
return Win32::CopyFile(@_, 1);
};
- } elsif ($^O eq 'MacOS') {
- require Mac::MoreFiles;
+ } elsif ($macfiles) {
*syscopy = sub {
my($from, $to) = @_;
my($dir, $toname);
systems, this calls the C<syscopy> XSUB directly. For Win32 systems,
this calls C<Win32::CopyFile>.
+On Mac OS (Classic), C<syscopy> calls C<Mac::MoreFiles::FSpFileCopy>,
+if available.
+
=head2 Special behaviour if C<syscopy> is defined (OS/2, VMS and Win32)
If both arguments to C<copy> are not file handles,
@ISA = qw(File::Spec::Unix);
use Cwd;
+my $macfiles;
+if ($^O eq 'MacOS') {
+ $macfiles = eval { require Mac::Files };
+}
=head1 NAME
trailing ":", because that's the correct specification for a volume
name on Mac OS.
+If Mac::Files could not be loaded, the empty string is returned.
+
=cut
sub rootdir {
# There's no real root directory on Mac OS. The name of the startup
# volume is returned, since that's the closest in concept.
#
- require Mac::Files;
- my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk,
- &Mac::Files::kSystemFolderType);
+ return '' unless $macfiles;
+ my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk,
+ &Mac::Files::kSystemFolderType);
$system =~ s/:.*\Z(?!\n)/:/s;
return $system;
}
PerlIO_ungetc
PerlIO_vprintf
PerlIO_write
+ PerlIO_perlio
+ Perl_PerlIO_clearerr
+ Perl_PerlIO_close
+ Perl_PerlIO_eof
+ Perl_PerlIO_error
+ Perl_PerlIO_fileno
+ Perl_PerlIO_fill
+ Perl_PerlIO_flush
+ Perl_PerlIO_get_base
+ Perl_PerlIO_get_bufsiz
+ Perl_PerlIO_get_cnt
+ Perl_PerlIO_get_ptr
+ Perl_PerlIO_read
+ Perl_PerlIO_seek
+ Perl_PerlIO_set_cnt
+ Perl_PerlIO_set_ptrcnt
+ Perl_PerlIO_setlinebuf
+ Perl_PerlIO_stderr
+ Perl_PerlIO_stdin
+ Perl_PerlIO_stdout
+ Perl_PerlIO_tell
+ Perl_PerlIO_unread
+ Perl_PerlIO_write
)];
}
} else {