File: hashref_crash.patch

package info (click to toggle)
libsoap-lite-perl 0.712-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,740 kB
  • ctags: 831
  • sloc: perl: 10,860; xml: 90; makefile: 23; cs: 16
file content (26 lines) | stat: -rw-r--r-- 1,205 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Author: Ashish Shukla <wahjava@members.fsf.org>
Subject: use 'ref' rather than 'UNIVERSAL::isa'
Reviewed-by: Nicholas Bamber <nicholas@periapt.co.uk>
Last-Update: 2010-11-03
Bug: http://rt.cpan.org/Ticket/Display.html?id=62667
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602056
--- a/lib/SOAP/Lite.pm
+++ b/lib/SOAP/Lite.pm
@@ -3747,13 +3747,13 @@
                 # fillup parameters
                 UNIVERSAL::isa($_[$param] => 'SOAP::Data')
                     ? $_[$param]->SOAP::Data::value($value)
-                    : UNIVERSAL::isa($_[$param] => 'ARRAY')
+                    : (ref($_[$param] eq 'ARRAY'))
                         ? (@{$_[$param]} = @$value)
-                        : UNIVERSAL::isa($_[$param] => 'HASH')
+                        : (ref($_[$param]) eq 'HASH')
                             ? (%{$_[$param]} = %$value)
-                            : UNIVERSAL::isa($_[$param] => 'SCALAR')
+                            : (ref($_[$param]) eq 'SCALAR')
                                 ? (${$_[$param]} = $$value)
-                                : ($_[$param] = $value)
+                                : ($_[$param] = $value);
             }
         }
     }