summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ExtUtils/Mksymlists.pm1
-rw-r--r--lib/File/Basename.pm9
-rw-r--r--lib/File/Path.pm4
-rw-r--r--lib/Term/ReadLine.pm8
-rw-r--r--lib/perl5db.pl6
5 files changed, 23 insertions, 5 deletions
diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm
index c8f41c74bc..c06b393be3 100644
--- a/lib/ExtUtils/Mksymlists.pm
+++ b/lib/ExtUtils/Mksymlists.pm
@@ -49,6 +49,7 @@ sub Mksymlists {
}
if ($osname eq 'aix') { _write_aix(\%spec); }
+ elsif ($osname eq 'MacOS'){ _write_aix(\%spec) }
elsif ($osname eq 'VMS') { _write_vms(\%spec) }
elsif ($osname eq 'os2') { _write_os2(\%spec) }
elsif ($osname eq 'MSWin32') { _write_win32(\%spec) }
diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm
index 4581e7e93c..279503680a 100644
--- a/lib/File/Basename.pm
+++ b/lib/File/Basename.pm
@@ -236,7 +236,14 @@ sub dirname {
if ($_[0] =~ m#/#) { $fstype = '' }
else { return $dirname || $ENV{DEFAULT} }
}
- if ($fstype =~ /MacOS/i) { return $dirname }
+ if ($fstype =~ /MacOS/i) {
+ $dirname =~ s/([^:]):\z/$1/s;
+ unless( length($basename) ) {
+ local($File::Basename::Fileparse_fstype) = $fstype;
+ ($basename,$dirname) = fileparse $dirname;
+ $dirname =~ s/([^:]):\z/$1/s;
+ }
+ }
elsif ($fstype =~ /MSDOS/i) {
$dirname =~ s/([^:])[\\\/]*\z/$1/;
unless( length($basename) ) {
diff --git a/lib/File/Path.pm b/lib/File/Path.pm
index 46f360a461..daa2eae0fb 100644
--- a/lib/File/Path.pm
+++ b/lib/File/Path.pm
@@ -105,8 +105,8 @@ my $Is_VMS = $^O eq 'VMS';
# These OSes complain if you want to remove a file that you have no
# write permission to:
-my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32'
- || $^O eq 'amigaos');
+my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' ||
+ $^O eq 'amigaos' || $^O eq 'MacOS');
sub mkpath {
my($paths, $verbose, $mode) = @_;
diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm
index 8bb820578a..fc78d7b6fa 100644
--- a/lib/Term/ReadLine.pm
+++ b/lib/Term/ReadLine.pm
@@ -169,12 +169,14 @@ sub ReadLine {'Term::ReadLine::Stub'}
sub readline {
my $self = shift;
my ($in,$out,$str) = @$self;
- print $out $rl_term_set[0], shift, $rl_term_set[1], $rl_term_set[2];
+ my $prompt = shift;
+ print $out $rl_term_set[0], $prompt, $rl_term_set[1], $rl_term_set[2];
$self->register_Tk
if not $Term::ReadLine::registered and $Term::ReadLine::toloop
and defined &Tk::DoOneEvent;
#$str = scalar <$in>;
$str = $self->get_line;
+ $str =~ s/^\s*\Q$prompt\E// if ($^O eq 'MacOS');
print $out $rl_term_set[3];
# bug in 5.000: chomping empty string creats length -1:
chomp $str if defined $str;
@@ -185,7 +187,9 @@ sub addhistory {}
sub findConsole {
my $console;
- if (-e "/dev/tty") {
+ if ($^O eq 'MacOS') {
+ $console = "Dev:Console";
+ } elsif (-e "/dev/tty") {
$console = "/dev/tty";
} elsif (-e "con" or $^O eq 'MSWin32') {
$console = "con";
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index fb6d683f7d..836e5594d8 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -401,6 +401,12 @@ if ($notty) {
$console = "/dev/tty";
} elsif ($^O eq 'dos' or -e "con" or $^O eq 'MSWin32') {
$console = "con";
+ } elsif ($^O eq 'MacOS') {
+ if ($MacPerl::Version !~ /MPW/) {
+ $console = "Dev:Console:Perl Debug"; # Separate window for application
+ } else {
+ $console = "Dev:Console";
+ }
} else {
$console = "sys\$command";
}