Skip Menu |

This queue is for tickets about the CGI-Application-Plugin-ValidateRM CPAN distribution.

Report information
The Basics
Id: 43205
Status: resolved
Priority: 0/
Queue: CGI-Application-Plugin-ValidateRM

People
Owner: MARKSTOS [...] cpan.org
Requestors: metaperl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.3
Fixed in: (no value)



Subject: cgiapp_postrun not executed
My CGI::Application runmode subroutines return instances of HTML::Tree... they do not return strings. This plugin seems to expect runmodes to return strings. It tries to render the results of my runmode subroutines without calling the cgiapp_postrun method: sub cgiapp_postrun { my ($self, $html_tree) = @_; $$html_tree = ref ${$html_tree} ? ${$html_tree}->as_HTML(undef, ' ') : $$html_tree ; } I dont have time to patch this, because I dont know the internals of cgiapp well enough and I am busy. But here is what I had to do in my sub to get things to work as a workaround: sub pricing { my ($app, $err) = @_; my ( $package, $filename, $line, $subroutine, $hasargs, $wantarray, $evaltext, $is_require, $hints, $bitmask ) = caller(1); warn "Caller data ( $package, $filename, $line, $subroutine, $hasargs, $wantarray, $evaltext, $is_require, $hints, $bitmask )"; use Model::M; use View::P; my $alist = Model::M::all($app); my $llist = Model::L::all($app); my $view = View::P->new(err => $err, app => $app, agent_list => $agent_list, lead_type_list => $lead_type_list); my $view_out = $view->render; # returns an HTML::Tree instance return ($package =~ /ValidateRM/) ? $view_out->as_HTML : $view_out ; }
Subject: Re: [rt.cpan.org #43205] cgiapp_postrun not executed
Date: Wed, 11 Feb 2009 10:09:16 -0500
To: bug-CGI-Application-Plugin-ValidateRM [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
> This plugin seems to expect runmodes to return strings. It tries to > render the results of my runmode subroutines without calling the > cgiapp_postrun method
Thanks for the feedback, Terrance. I disagree that this plugin should call postrun for what it does. If you gather support from some other people on the cgiapp mailing list, I could perhaps be convinced otherwise, but this point I'm not interested in working on or accepting a patch for this behavior. Mark