]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - lib/CGI/Ex/Dump.pm
CGI::Ex 2.37
[chaz/p5-CGI-Ex] / lib / CGI / Ex / Dump.pm
index 924d493402f7dfc8ad8a988a044e56fe223e5d90..574eae57438b258e422f25d2a6f10dc22962256b 100644 (file)
@@ -7,7 +7,7 @@ CGI::Ex::Dump - A debug utility
 =cut
 
 ###----------------------------------------------------------------###
-#  Copyright 2007 - Paul Seamons                                     #
+#  Copyright 2004-2012 - Paul Seamons                                #
 #  Distributed under the Perl Artistic License without warranty      #
 ###----------------------------------------------------------------###
 
@@ -17,10 +17,10 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION
 use strict;
 use Exporter;
 
-$VERSION   = '2.32';
+$VERSION   = '2.37';
 @ISA       = qw(Exporter);
 @EXPORT    = qw(dex dex_warn dex_text dex_html ctrace dex_trace);
-@EXPORT_OK = qw(dex dex_warn dex_text dex_html ctrace dex_trace debug);
+@EXPORT_OK = qw(dex dex_warn dex_text dex_html ctrace dex_trace debug caller_trace);
 
 ### is on or off
 sub on  { $ON = 1 };
@@ -102,7 +102,7 @@ sub _what_is_this {
   } else {
     my $html = "<pre class=debug><span class=debughead><b>$called: $file line $line_n</b></span>\n";
     for (0 .. $#dump) {
-      $dump[$_] =~ s/\\n/\n/g;
+      $dump[$_] =~ s/(?<!\\)\\n/\n/g;
       $dump[$_] = _html_quote($dump[$_]);
       $dump[$_] =~ s|\$VAR1|<span class=debugvar><b>$var[$_]</b></span>|g;
       $html .= $dump[$_];
@@ -113,6 +113,7 @@ sub _what_is_this {
     CGI::Ex::print_content_type();
     print $html;
   }
+  return @_[0..$#_];
 }
 
 ### some aliases
@@ -160,6 +161,8 @@ sub ctrace {
   return \@i;
 }
 
+*caller_trace = \&ctrace;
+
 sub dex_trace {
   _what_is_this(ctrace(1));
 }
This page took 0.019385 seconds and 4 git commands to generate.