M: Simplified initialization of action callbacks.

This commit is contained in:
Jens Luedicke
2013-03-09 21:24:05 +01:00
parent 456b79fb21
commit 4cabd19964

View File

@@ -30,13 +30,11 @@ sub new {
my ($class) = @_;
my $self = bless {}, $class;
$self->{onBeginWalk} = sub { SUCCESS };
$self->{onLink} = sub { SUCCESS };
$self->{onFile} = sub { SUCCESS };
$self->{onDirEnter} = sub { SUCCESS };
$self->{onDirLeave} = sub { SUCCESS };
foreach my $action (qw/onBeginWalk onLink onFile onDirEnter onDirLeave/) {
$self->{$action} = sub { SUCCESS };
}
$self->{depth} = 0;
$self->{depth} = 0;
$self->{currentDepth} = 0;
$self->{entryList} = [];