summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2001-09-07 10:30:03 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-07 20:34:55 +0000
commit7f16a916e38092766fa8e01dc13187d7e1f1362c (patch)
tree91c52bf857318fefaf547aa43bc6529b707a164d /lib
parent40b90ac360c5ba3f485ee4b716fd0937d89c1054 (diff)
downloadperl-7f16a916e38092766fa8e01dc13187d7e1f1362c.tar.gz
slash slashes in lib/CGI/Carp.pm
Message-Id: <5.1.0.14.0.20010907142644.03700c38@exchi01> p4raw-id: //depot/perl@11943
Diffstat (limited to 'lib')
-rw-r--r--lib/CGI/Carp.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CGI/Carp.pm b/lib/CGI/Carp.pm
index 3af2e9f221..2829e225a9 100644
--- a/lib/CGI/Carp.pm
+++ b/lib/CGI/Carp.pm
@@ -218,6 +218,7 @@ CGI::Response
require 5.000;
use Exporter;
use Carp;
+use File::Spec;
@ISA = qw(Exporter);
@EXPORT = qw(confess croak carp);
@@ -248,19 +249,19 @@ sub realdie { CORE::die(@_); }
sub id {
my $level = shift;
my($pack,$file,$line,$sub) = caller($level);
- my($id) = $file=~m|([^/]+)$|;
+ my($dev,$dirs,$id) = File::Spec->splitpath($file);
return ($file,$line,$id);
}
sub stamp {
my $time = scalar(localtime);
my $frame = 0;
- my ($id,$pack,$file);
+ my ($id,$pack,$file,$dev,$dirs);
do {
$id = $file;
($pack,$file) = caller($frame++);
} until !$file;
- ($id) = $id=~m|([^/]+)$|;
+ ($dev,$dirs,$id) = File::Spec->splitpath($id);
return "[$time] $id: ";
}