X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2FApp.pm;h=4a62f920b390b9228abc345090b23c1429e0415b;hb=48c4840be1f154e262de2c161cb86dc5000dfe47;hp=11e396529d42f43958e283943bd6a11201c2a8c2;hpb=3fe8e76eb82e9d74f656674c5ba913950e166ab1;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/App.pm b/lib/CGI/Ex/App.pm index 11e3965..4a62f92 100644 --- a/lib/CGI/Ex/App.pm +++ b/lib/CGI/Ex/App.pm @@ -10,7 +10,7 @@ use strict; use vars qw($VERSION); BEGIN { - $VERSION = '2.02'; + $VERSION = '2.05'; Time::HiRes->import('time') if eval {require Time::HiRes}; } @@ -382,6 +382,8 @@ sub run_hook { my ($code, $found) = @{ $self->find_hook($hook, $step) }; if (! $code) { croak "Could not find a method named ${step}_${hook} or ${hook}"; + } elsif (! UNIVERSAL::isa($code, 'CODE')) { + croak "Value for $hook ($found) is not a code ref ($code)"; } ### record history