• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5383: Change logic for separator

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension AttachmentListPlugin Enhancement Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary Change logic for separator
ReportedBy TWiki:Main.JohnFitzpatrick
Codebase

SVN Range TWiki-5.0.0, Wed, 23 Jan 2008, build 16283
AppliesTo Extension
Component AttachmentListPlugin
Priority Enhancement
CurrentState Closed
WaitingFor

Checkins TWikirev:16449
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r2 - 2008-02-24 - ArthurClemens
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback