Change 11943 by jhi@alpha on 2001/09/07 20:34:55
Subject: [PATCH perl@11938] slash slashes in lib/CGI/Carp.pm
From: "Craig A. Berry" <[EMAIL PROTECTED]>
Date: Fri, 07 Sep 2001 15:30:03 -0500
Message-Id: <5.1.0.14.0.20010907142644.03700c38@exchi01>
Affected files ...
... //depot/perl/lib/CGI/Carp.pm#13 edit
Differences ...
==== //depot/perl/lib/CGI/Carp.pm#13 (text) ====
Index: perl/lib/CGI/Carp.pm
--- perl/lib/CGI/Carp.pm.~1~ Fri Sep 7 14:45:06 2001
+++ perl/lib/CGI/Carp.pm Fri Sep 7 14:45:06 2001
@@ -218,6 +218,7 @@
require 5.000;
use Exporter;
use Carp;
+use File::Spec;
@ISA = qw(Exporter);
@EXPORT = qw(confess croak carp);
@@ -248,19 +249,19 @@
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: ";
}
End of Patch.