logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

proposal to enhance load_tmpl() with default template name.: msg#00104

lang.perl.modules.cgi-appplication

Subject: proposal to enhance load_tmpl() with default template name.

Hello,

Here's a proposal to enhance a load_tmpl() a bit more. Now that we have
CGI::Application::Forward, we can reliably get the current run mode if
we want to.

I propose the load_tmpl() default trying $runmode.'.html' as the
template name, if no file name is provided.

I believe this is backwards compatible because currently an undefined
value would get passed to HTML::Template, which would die in this case.

This means for common cases you can just do:

my $t = $self->load_tmpl;
$t->param(\%params);
return $t->output;

And the project may be easier to navigate because of the added
consistency between run mode names and file names.

Of course, using the ::AnyTemplate plugin, this could be even briefer if
you want:

return $self->template->fill(\%params);

While I think power users will gravitate towards using the ::TT or
::AnyTemplate plugins, I think some will prefer having this simple
feature in the core, without having to learn or use additional
middleware to talk to a templating system.

Thoughts?

Mark

--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
mark-WmyhgDpj2fCHT8/ATrE1yw@xxxxxxxxxxxxxxxx Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .


---------------------------------------------------------------------
Web Archive:
http://www.mail-archive.com/cgiapp-svx1JCNWaqPWzzAP45jFb16hYfS7NtTn@xxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail:
cgiapp-unsubscribe-svx1JCNWaqPWzzAP45jFb16hYfS7NtTn@xxxxxxxxxxxxxxxx
For additional commands, e-mail:
cgiapp-help-svx1JCNWaqPWzzAP45jFb16hYfS7NtTn@xxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
krysalis.sandbo...    web.zope.zwiki/...    gnome.apps.gnum...    xfree86.newbie/...    editors.vim/200...    mozilla.enigmai...    boot-loaders.gr...    network.vnc.ult...    redhat.release....    java.geronimo.u...    os.netbsd.devel...    horde.wicked/20...    linux.lsb.discu...    ietf.ips/2005-0...    alsa.devel/2002...    user-groups.lin...    package-managem...    debian.devel.da...    security.cyrus....    video.gstreamer...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation