use HTML::Seamstress; # load the view my $seamstress = HTML::Seamstress->new_from_file('simple.html'); # load the model my $o = Simple::Class->new; $seamstress->table ( # tell seamstress where to find
| tags # content_handler() is a Seamstress function which takes # $id_val and $content as args. It does a ->look_down('id', $id_val) # and sets the content section of the found node (a | ) to $content td_data => sub { my ($tr_node, $tr_data) = @_; $tr_node->content_handler($_ => $tr_data->{$_}) for qw(name age weight) } ); print $seamstress->as_HTML; |