M: Simplified sanity check.

This commit is contained in:
Jens Luedicke
2013-03-09 21:24:54 +01:00
parent 4cabd19964
commit 945f88f45e

View File

@@ -46,7 +46,7 @@ sub new {
sub setHandler {
my ($self,$action,$func) = @_;
if ($action !~ /onBeginWalk|onLink|onFile|onDirEnter|onDirLeave/) {
if (not exists $self->{$action}) {
croak("Invalid action argument: $action");
}