M: Simplified sanity check.
This commit is contained in:
@@ -46,7 +46,7 @@ sub new {
|
|||||||
sub setHandler {
|
sub setHandler {
|
||||||
my ($self,$action,$func) = @_;
|
my ($self,$action,$func) = @_;
|
||||||
|
|
||||||
if ($action !~ /onBeginWalk|onLink|onFile|onDirEnter|onDirLeave/) {
|
if (not exists $self->{$action}) {
|
||||||
croak("Invalid action argument: $action");
|
croak("Invalid action argument: $action");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user