in reply to basic CGI::Prototype::Hidden

An example application will be added within a few weeks, thanks to my silent co-contributor. This will also be the test app so I can have better test coverage.

But yes, you got everything correct. If your My::App and My::App::welcome classes have no additional methods, then welcome.tt will indeed be displayed. Any suggestions for doc improvements are also welcome... the ::Hidden class is pretty underdocumented at the moment because of lack of examples.

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

Replies are listed 'Best First'.
Re^2: basic CGI::Prototype::Hidden
by zby (Vicar) on Jan 18, 2005 at 17:23 UTC
    Thank you. One more question - what should go into My::App?
      Well, "welcome" is one page, so you put methods that are page-specific there. "My::App" is the application, so you put methods and data that are application-wide there, including the setting of those config variables.

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

        I still don't get how the code in My::App is called. I mean the activate method dispaches to My::App::welcome - how the control goes back? How can I use My::App methods in My::App::welcome? One answer I see is that My::App::welcome should be derived from My::App instead of CGI::Prototype. Would it not be simpler if the activate function was a Class method so that the My::App object would be completly optional?