display —
Interchange 5.9.0:
Source: code/Widget/display.widget
Lines: 12
# Copyright 2005-2007 Interchange Development Group and others # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. See the LICENSE file for details. # # $Id: display.widget,v 1.3 2007-03-30 23:40:58 pajamian Exp $ CodeDef display Widget 1 CodeDef display Description Text of option CodeDef display MapRoutine Vend::Form::current_label
Source: lib/Vend/Form.pm
Lines: 321
sub current_label {
my($opt, $data) = @_;
my $val;
my $default;
if (defined $opt->{value}) {
$val = $opt->{value};
}
elsif(defined $opt->{default}) {
$val = $opt->{default};
}
$val =~ s/\0//;
for(@$data) {
my ($setting, $label) = @$_;
$default = $label if $label =~ s/\*$//;
return ($label || $setting) if $val eq $setting;
}
return $val || $default;
}