[perl-Gtk3] Do not use 'defined' on an array



commit 2ddaef82ecd85eda0a3f777eef96f6782b7089a6
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Mon Sep 16 15:52:54 2013 +0200

    Do not use 'defined' on an array
    
    Spotted by Thierry Vignaud.

 lib/Gtk3.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index 5285cf9..539068f 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -1386,7 +1386,7 @@ sub _unpack_keys_and_values {
 sub _unpack_unless_array_ref {
   my ($data) = @_;
   local $@;
-  return defined eval { @{$data} }
+  return eval { @{$data} }
     ? $data
     : [unpack 'C*', $data];
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]