package Template::PopupTreeSelect; use 5.006; use strict; use warnings; use Carp qw(croak); use Template 2.08; our $VERSION = "0.9"; use base 'HTML::PopupTreeSelect'; =head1 NAME Template::PopupTreeSelect - HTML popup tree widget =head1 DESCRIPTION Subclasses L. =cut our $TEMPLATE_SRC; sub output { my($self, $template) = @_; return $self->SUPER::output( $template || Template->new(TAG_STYLE => 'star') ); } sub _output_generate { my($self, $template, $param) = @_; my $output; $template->process(\$TEMPLATE_SRC, $param, \$output); return $output; } $TEMPLATE_SRC = <[* END; #include_css *]
[* title *]
[* FOREACH leaf = loop *] [* UNLESS leaf.end_block *]
[* IF leaf.has_children *] [* ELSE *] [* END *] [* leaf.label *]
[* IF leaf.has_children *]
[* END *] [* ELSE *]
[* END *] [* END *]
END 1;