Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/Nim/Plugin/Entry/File.pm b/lib/Nim/Plugin/Entry/File.pm
- index 521d2a3..a8fb73f 100644
- --- a/lib/Nim/Plugin/Entry/File.pm
- +++ b/lib/Nim/Plugin/Entry/File.pm
- @@ -3,6 +3,8 @@ use Any::Moose;
- with 'Nim::Plugin';
- +has suffix => ( is => 'rw', isa => 'Str', default => 'txt' );
- +
- use Carp;
- use Nim::Entry;
- @@ -25,10 +27,10 @@ sub find {
- $context->conf->data_dir->recurse( callback => sub {
- my $f = $_[0];
- return unless -f $f;
- - return unless $f->basename =~ /\.txt$/;
- + return unless $f->basename =~ /\.$self->{suffix}$/;
- (my $path = $f->parent) =~ s/^$dir//;
- - (my $name = $f->basename) =~ s/\.txt$//;
- + (my $name = $f->basename) =~ s/\.$self->{suffix}$//;
- $context->log->info('find: %s', $f);
Add Comment
Please, Sign In to add comment