Yeah! As it seems CGI::Application was updated just few days ago - didnt know that.
But still, there are things (allready mentioned) that I simply dont like on CGI::Application, and some things that I miss (that "plugin" or however you want to call it possibility).
Eventialy, what I want to do. Create a plugin, it will be (use base/ISA) child of my mai<bn module so that I could use it's data (configs, db connections ...etc). And then be able to put simple tag to call that plugin in any template on my site (since everything goes over CGI::App) To be precise, all requests except for graphic/css/similar, are processed by mod_rewrite and call index.cgi (yeah only one). Based on parameters, my main module derived from CGI::App calls specified modules. All works great, but it's not soo good as I hope. I simply want more integration that more screens in one place. Basicly I want whole site, in central unit that does specific things (auth for instance) and then call on itself the rest of the code from specific modules/sections. As it turned out I actualy faked OOP by passing $self as first param. And as I said, everything is working, but not as easy to maintan as I would like
For instance: (code included here)
OK it's probably partialy my fault as I was only starting with OOP when I wrote that but still ...
Any ideas of how do acomplish something like this, but in a more elegant way?
|