# Copyright (c) 2005 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: String.pm,v 1.2 2005/10/26 22:19:17 david Exp $ package Bivio::UI::Text::Widget::String; use strict; $Bivio::UI::Text::Widget::String::VERSION = sprintf('%d.%02d', q$Revision: 1.2 $ =~ /\d+/g); $_ = $Bivio::UI::Text::Widget::String::VERSION; =head1 NAME Bivio::UI::Text::Widget::String - x =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::UI::Text::Widget::String; =cut =head1 EXTENDS L =cut use Bivio::UI::Widget::Join; @Bivio::UI::Text::Widget::String::ISA = ('Bivio::UI::Widget::Join'); =head1 DESCRIPTION C =cut #=IMPORTS #=VARIABLES =head1 METHODS =cut =for html =head2 initialize() =cut sub initialize { my($self) = @_; $self->put(values => [$self->get('value')]); return shift->SUPER::initialize(@_); } =for html =head2 static internal_new_args(any arg, ...) : any Implements positional argument parsing for L. =cut sub internal_new_args { my(undef, $value, $attributes) = @_; return { value => $value, ($attributes ? %$attributes : ()), }; } =for html =head2 unsafe_resolve_widget_value(any value, any source) : any Allow scalar refs to render as a string. =cut sub unsafe_resolve_widget_value { my($self, $value, $source) = @_; $value = $self->SUPER::unsafe_resolve_widget_value($value, $source); $value = $$value if ref($value) eq 'SCALAR'; return $value; } #=PRIVATE SUBROUTINES =head1 COPYRIGHT Copyright (c) 2005 bivio Software, Inc. All Rights Reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: String.pm,v 1.2 2005/10/26 22:19:17 david Exp $ =cut 1;