Re: bug: option value 1 with a space

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug: option value 1 with a space

Lincoln Stein-2
Hi Hilmar,

You are right, and I've fixed this in bioperl-live. The idea for this hack was
the following logic:

        -option => 1          # true value - return the default
        -option => 'foo'    # true value - return 'foo'
        -option=> '1 '       # return "1"

This assumes that nobody will ever want the label, description, or whatever to
be "1 ".

Lincoln


On Friday 02 September 2005 09:27 pm, Hilmar Lapp wrote:

> I've seen at least 3 places in Bio/Graphics/Glyph/generic.pm with the
> following logic:
>
> # ...
> return $label unless $label eq '1';
> return "1"    if $label eq '1 '; # 1 with a space
> # ... (e.g., return some default value/behavior or whatever)
>
> Is '1 ' (1 with a space) still being used or advocated as option value?
> If no, the respective lines should probably be removed. If yes, the two
> lines need to change order to both take effect or otherwise the
> condition $label eq '1 ' will never be true at the point it is tested.
>
> Or am I missing something?
>
> -hilmar

--
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT [hidden email]


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gmod-gbrowse mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
Loading...