From: Vincent Pit Date: Fri, 23 Jul 2010 20:37:25 +0000 (+0200) Subject: Test handler definedness in LaTeX::TikZ::Functor X-Git-Tag: v0.02~30 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=97b908646cec259d9907cfe8ce1f66cb506086ac;p=perl%2Fmodules%2FLaTeX-TikZ.git Test handler definedness in LaTeX::TikZ::Functor --- diff --git a/lib/LaTeX/TikZ/Functor.pm b/lib/LaTeX/TikZ/Functor.pm index e7ee0a6..2b6974e 100644 --- a/lib/LaTeX/TikZ/Functor.pm +++ b/lib/LaTeX/TikZ/Functor.pm @@ -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 ]; });