I think the logic for the separator parameter could be optimized.
Now:
First $separator is initialized.
my $separator = $params->{'separator'} || '';
In a loop, then a different separator is created:
my $sep = $separator || "\n"; $outtext .= $s . $sep;
Finally the last separator is removed....
$outtext =~ s/$separator$//g;
Proposal:
First $separator is initialized.
my $separator = $params->{'separator'} || "\n";
In a loop, don't use a different separator :
my $sep = $separator || "\n"; $outtext .= $s . $separator;
Finally the last separator is removed....
$outtext =~ s/$separator$//g;
--
TWiki:Main/JohnFitzpatrick - 22 Feb 2008
Thanks. And done.
--
TWiki:Main.ArthurClemens - 24 Feb 2008