Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Extending HTML::Template, how to do it?

by techcode (Hermit)
on Jun 17, 2005 at 07:14 UTC ( [id://467594]=note: print w/replies, xml ) Need Help??


in reply to Re: Extending HTML::Template, how to do it?
in thread Extending HTML::Template, how to do it?

No I havent asked it on HTML::Template's mailing list. Will check out. But also your solution seems quite interesting and quite simpler than what I was thinking - probably even faster :)

But I really think that using a leading '_' on a method a really bad idea. It would be completely counter-intuitive to what any other perl programmer would think since it's tradition for '_' to make private methods.
Well that's the general idea, and it depends in the way you look at it. In some way, it is private - as that it shouldnt be able to execute it as run_mode. But will think about some other notation.

I also tougth to implement few other things (sessions, some sort of DB abstraction that I wrote and few more things) in an all-in-one convinient module/framework

Currently I just want this done for myself as I have few projets comming (last semester project, and disertation project, few sites I want to do) and dont have time to write this for the public - not to mention that I dont have knowlege (testing, documentation ...etc) to put it on CAPN (and obviosly no time to learn it).

I just found CGI::Builder, seems nice, will check out that first - before I start writing myown framework ;)
  • Comment on Re^2: Extending HTML::Template, how to do it?

Replies are listed 'Best First'.
Re^3: Extending HTML::Template, how to do it?
by mpeters (Chaplain) on Jun 17, 2005 at 11:58 UTC
    Honestly if you're interested in frameworks, then you should really look at what's happening in the CGI::Application world at this time. It has a new plugin/callback system and if you look at CPAN you'll see lots of new plugins including one for session integration.

    And if those aren't enough for you, there is a soon to be arriving CGI::Application::Framework. And if that still isn't enough for you, I'd look at Catalyst.

    -- More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier

      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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://467594]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-16 13:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found