[Koha-bugs] [Bug 12061] tmpl_process3.pl new features
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sat Jun 7 14:17:23 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12061
--- Comment #24 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
(In reply to Jonathan Druart from comment #21)
> Comment on attachment 28645 [details] [review]
> Bug 12061 - tmpl_process3.pl - Include/exclude file by name
>
> Review of attachment 28645 [details] [review]:
> -----------------------------------------------------------------
>
> ::: misc/translator/tmpl_process3.pl
> @@ +146,4 @@
> > || (defined $exclude_regex && $dirent =~ /^(?:$exclude_regex)$/)) {
> > ;
> > } elsif (-f $path) {
> > + my $basename = fileparse( $path );
>
> hum, not sure to understand the change here.
Currently $basename is declared and initialized, but not used.
My idea was to use this variable to match filenames, instead of using $path.
Current code could match a dir name if used with a generic term, e.g. "-f help"
will match all help 'dirs' on staff, and is supposed to match filenames.
But, if I understand correctly [1], it's better to use fileparse() for that
instead of basename().
[1] http://perldoc.perl.org/File/Basename.html
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list