Skip to content

Instantly share code, notes, and snippets.

@c9s
Created November 7, 2009 08:19
Show Gist options
  • Save c9s/228617 to your computer and use it in GitHub Desktop.
Save c9s/228617 to your computer and use it in GitHub Desktop.
package Test;
use warnings;
use strict;
use Template::Declare::Tags;
sub new {
my $class = shift;
bless { } , $class ;
}
sub widget_1 {
my $self = shift;
my $template = sub {
my $self = shift;
h3 { " Test2 " };
};
Template::Declare->buffer->push( private => 1);
$template->( $self );
return Template::Declare->buffer->pop;
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment