M: Simplified initialization of action callbacks.
This commit is contained in:
@@ -30,13 +30,11 @@ sub new {
|
|||||||
my ($class) = @_;
|
my ($class) = @_;
|
||||||
my $self = bless {}, $class;
|
my $self = bless {}, $class;
|
||||||
|
|
||||||
$self->{onBeginWalk} = sub { SUCCESS };
|
foreach my $action (qw/onBeginWalk onLink onFile onDirEnter onDirLeave/) {
|
||||||
$self->{onLink} = sub { SUCCESS };
|
$self->{$action} = sub { SUCCESS };
|
||||||
$self->{onFile} = sub { SUCCESS };
|
}
|
||||||
$self->{onDirEnter} = sub { SUCCESS };
|
|
||||||
$self->{onDirLeave} = sub { SUCCESS };
|
|
||||||
|
|
||||||
$self->{depth} = 0;
|
$self->{depth} = 0;
|
||||||
$self->{currentDepth} = 0;
|
$self->{currentDepth} = 0;
|
||||||
|
|
||||||
$self->{entryList} = [];
|
$self->{entryList} = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user