in reply to A CGI::Prototype respond() subroutine for Data::FormValidator users

one thing. you can't call methods for slots which are not defined. this means the calls to $self->dfv_profile will not work in classes which do not (and should not) have this defined.

so I cheat and check for the hash values in the hash which underly my object.

  • Comment on Re: A CGI::Prototype respond() subroutine for Data::FormValidator users
  • Download Code

Replies are listed 'Best First'.
Re^2: A CGI::Prototype respond() subroutine for Data::FormValidator users
by merlyn (Sage) on Feb 04, 2005 at 22:00 UTC
    so I cheat and check for the hash values in the hash which underly my object
    Perl leads you to bad habits. {grin}

    The clean way is to define a backstop method that returns an empty hash. I have lots of those kinds of examples in the source code for CGI::Prototype. No checking required, then.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.