[Jifty-commit] jifty branch, master, updated. ada1d6690087e0c5f25b0376cfad359eaacde6ec

Jifty commits jifty-commit at lists.jifty.org
Tue Mar 30 04:09:45 EDT 2010


The branch, master has been updated
       via  ada1d6690087e0c5f25b0376cfad359eaacde6ec (commit)
      from  1b150d0ee5dad6d308615566b1efbb65b9688921 (commit)

Summary of changes:
 lib/Jifty/Param/Schema.pm |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit ada1d6690087e0c5f25b0376cfad359eaacde6ec
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Mar 30 16:09:21 2010 +0800

    let's hack Hash::Merge for now

diff --git a/lib/Jifty/Param/Schema.pm b/lib/Jifty/Param/Schema.pm
index b0f9385..dfab7ae 100644
--- a/lib/Jifty/Param/Schema.pm
+++ b/lib/Jifty/Param/Schema.pm
@@ -151,6 +151,22 @@ sub schema (&) {
 }
 
 use Hash::Merge ();
+{
+# XXX to eliminate the warning:
+#   Can't call method "isa" on unblessed reference
+# see https://rt.cpan.org/Public/Bug/Display.html?id=55978
+    no warnings 'redefine';
+    *Hash::Merge::_get_obj = sub {
+        my $type = ref $_[0];
+        if (   $type
+            && $type !~ /^(?:SCALAR|ARRAY|HASH)$/
+            && ( $type eq 'Hash::Merge' || $_[0]->isa('Hash::Merge') ) )
+        {
+            return shift;
+        }
+        return $Hash::Merge::context;
+    };
+}
 
 no warnings 'uninitialized';
 use constant MERGE_PARAM_BEHAVIOUR => {

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list