]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/commitdiff
Test handler definedness in LaTeX::TikZ::Functor
authorVincent Pit <vince@profvince.com>
Fri, 23 Jul 2010 20:37:25 +0000 (22:37 +0200)
committerVincent Pit <vince@profvince.com>
Fri, 23 Jul 2010 20:37:25 +0000 (22:37 +0200)
lib/LaTeX/TikZ/Functor.pm

index e7ee0a60aab9c0a9cd5f63fd9539f2c3bcc82b40..2b6974e995a2854ada2a3714a5d4cf4911f99022 100644 (file)
@@ -60,7 +60,7 @@ BEGIN {
   }
 
   Carp::confess("Invalid handler for target $target")
-                                                  unless ref $handler eq 'CODE';
+                             unless defined $handler and ref $handler eq 'CODE';
 
   return [ $target, $handler, $is_set ];
  });