X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2FDump.pm;h=c4d49f977f3d7d71ad25167eb0f40704129c636f;hb=d710d6cd21be21c0ab2df3566c2bd61d9015cac6;hp=7a2e7aa8f3cdee611e762163c7559bdb2033226a;hpb=3fe8e76eb82e9d74f656674c5ba913950e166ab1;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/Dump.pm b/lib/CGI/Ex/Dump.pm index 7a2e7aa..c4d49f9 100644 --- a/lib/CGI/Ex/Dump.pm +++ b/lib/CGI/Ex/Dump.pm @@ -17,7 +17,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION use strict; use Exporter; -$VERSION = '2.02'; +$VERSION = '2.04'; @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); @@ -76,9 +76,13 @@ sub _what_is_this { ### dump it out my @dump = map {&$SUB($_)} @_; my @var = ('$VAR') x ($#dump + 1); - if ($line =~ s/^ .*\b \Q$called\E ( \(?\s* | \s+ )//x - && $line =~ s/(?:\s+if\s+.+)? ;? \s*$//x) { - $line =~ s/ \s*\) $ //x if $1 && $1 =~ /\(/; + my $hold; + if ($line =~ s/^ .*\b \Q$called\E ( \s* \( \s* | \s+ )//x + && ($hold = $1) + && ( $line =~ s/ \s* \b if \b .* \n? $ //x + || $line =~ s/ \s* ; \s* $ //x + || $line =~ s/ \s+ $ //x)) { + $line =~ s/ \s*\) $ //x if $hold =~ /^\s*\(/; my @_var = map {/^[\"\']/ ? 'String' : $_} split (/\s*,\s*/, $line); @var = @_var if $#var == $#_var; }