SPUG: Re: clever(?) new way to code CGI...

Brian Ingerson briani at activestate.com
Tue Oct 24 13:33:39 CDT 2000

Richard Anderson wrote:
> It's a matter of making the most effective use of your time.  Any module
> that offers complex functionality is necessarily going to have a complex
> API.  

Not necessarily. Modules can offer a lot of DWIMity instead of a complex
API. (Inline.pm for example :-) Maybe Jason could write a template
module that "Does what I mean".

The whole cgi templating issue is a very tough nut that I believe has
not been completely cracked. That's why there are soooo many modules
that have tried.

> I do agree that most CPAN modules have inadequate documentation, but
> since they always come with source code I can usually figure them out in
> much less time than it takes to reproduce the code "my way".
> I found the interface for HTML::Template to be very simple, and I learned it
> in less than an hour.
> The other benefit of using CPAN modules is that the more popular ones are
> often upgraded and maintained over the years.  It's like free candy.
> If you feel a module is inadequate but useful, you can modify it to work the
> way you want, then send the new code to the author for incorporation.  If
> the author doesn't like your mods, you can release your version as a new
> CPAN module.

I definitely agree that the CPAN is the place to start. 2 years ago I
wrote my own templating module only to discover that MJD had done
exactly what I had intended, only much better. I immediately switched to
his version. (At the very least, it saved me from having to write doc :)

But if everything out there leaves you dry, please give the nut another
crack. I'm sure that our group would be glad to review it for you.

> CPAN is one of the things that makes Perl great, and I feel it is in my
> self-interest to support it.

Amen. It is of interest to note, that my initial work at ActiveState is
in making our CPAN related offerings better. Now would be a fine time
for you SPUGsters to voice your opinions about that.

perl -e 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker\\n",x);}};print JAxH+Perl'

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/

More information about the spug-list mailing list