[cgiapp] my action subroutines all return references, which get stringified

Terrence Brannon tbrannon at insuranceagents.com
Tue Jan 27 13:22:33 EST 2009


My action routines are returning subclasses of HTML::Tree, which I then turn
into strings in my cgiapp_postrun method like so:

sub cgiapp_postrun {
  my ($self, $html_tree) = @_;

  return $$html_tree->stringify() ;
}

but unfortunately what is happening is that the browser is displaying things
like:
HTML::Tree=HASH(0x92060bc)

instead of the results of stringifying that HTML::Tree instance.

A sample action routine is this:

sub detail_fund_account {
  my $app = shift;

  my $shell_tree  = $app->tree_from('Admin::Shell');   # HTML::Tree instance
of page layout
  my $oyster_tree = $app->guts_from('Detail::FundAccount'); # HTML::Tree
instance of page specifics

  $shell_tree->common_fill($app, $oyster_tree); # place page specifics
within general page layout

  $shell_tree; # return the HTML::Tree instance for the postrun method to
stringify

}


More information about the cgiapp mailing list