From 0be6a682a51f9310a446ded5d98b53ae90c5f598 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 1 Mar 2017 17:21:40 +0100 Subject: [PATCH] LXDebug::dump: nur Form-Instanzen als Hash behandeln, nicht alle Hash-basierten Objekte --- SL/LXDebug.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index e22dc0f5e..2c06b8b86 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -20,7 +20,7 @@ use constant STDERR_TARGET => 1; use Data::Dumper; use POSIX qw(strftime getpid); -use Scalar::Util qw(blessed refaddr reftype weaken); +use Scalar::Util qw(blessed refaddr weaken); use Time::HiRes qw(gettimeofday tv_interval); use YAML; use SL::Request (); @@ -176,7 +176,7 @@ sub dump { if (blessed($src) && $src->can('as_debug_info')) { $dumped{$addr} = $src->as_debug_info; - } elsif (reftype($src) eq 'ARRAY') { + } elsif (ref($src) eq 'ARRAY') { $dumped{$addr} = []; foreach my $entry (@{ $src }) { @@ -187,7 +187,7 @@ sub dump { } - } elsif (reftype($src) eq 'HASH') { + } elsif (ref($src) =~ m{^(?:HASH|Form)$}) { $dumped{$addr} = {}; foreach my $key (keys %{ $src }) { -- 2.20.1