On 2005-09-22, Jason Purdy <[EMAIL PROTECTED]> wrote:
> Just uploaded to CPAN, so it will soon be available (if it isn't already).
>
> This plugin works w/ CAP-Session to tuck away messages as well as uses 
> cgiapp's load_tmpl hook to splice in the messages into your template.
>
> This would be useful for status messages, error messages, etc.

So let me see if I get this:

- I could use it conjunction with ::ValidateRM so the form display could
  simplified from:

  sub form_display {
    my $self = shift;
    my $errs = shift;
    my $t = $self->load_tmpl;
    $t->param($errs) if $errs;
    return $t->output;
  }

  To:

  sub form_display {
        my $self = shift;
        my $t = $self->load_tmpl;
        return $t->output;
  }

However, this shouldn't require a session system, because I don't
currently need one.  It would be nice for the session system to be
optional. 

The user could declare through the API that they don't want the messages
to persist. 

The docs say: "[ the clear_messages() ] method will be called
automatically when the Plugin puts it into your template." but I don't
see that happening in the code.

If that's true, the session could be required lazily. If you get to
cgiapp_postrun() and there is anything left in the message stack, /then/
it would require a persistent session to stuff them into. Otherwise, no
persistence was necessary. 

I'm not sure whether I like the sneakiness of passing parameters to the
template through a backdoor, but it may grow on me.

Looking at the bigger picture, I'm not sure I'd use this plugin with
more of tutorial explaining its usefulness. Right now I'm in a state of
blissful ignorance as I've live on my life without it.

Have you tested this with the 4.04 dev releases? The load_tmpl() hook
changed a little there?

    Mark

--
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   [EMAIL PROTECTED]     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to