|
|
Choosing A Webhost: |
Re: proposal to enhance load_tmpl() with default template name.: msg#00107lang.perl.modules.cgi-appplication
On 8/24/05, Jason Purdy <jason@xxxxxxxxxxxxxxxx> wrote: > Also, while you're looking at load_tmpl(), can you also modify it to > support loading non-files (filehandles or scalars w/ the content already > in there)? For the filehandle scenario, you could just check the > parameter. For the scalars w/ template content in them, that might take > another method name ... like $self->set_tmpl( $template_source, ... ); The standard idiom for passing either a filename or the contents of a file is to pass the contents as a reference to a string, and the filename as a plain string. $self->load_tmpl(\'<html>...</html>'); $self->load_tmpl('filename.tmpl'); This ends up being backwards compatible as well. Cheers, Cees --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: proposal to enhance load_tmpl() with default template name., Mark Stosberg |
|---|---|
| Next by Date: | PATCH: Re: proposal to enhance load_tmpl() with default template name., Mark Stosberg |
| Previous by Thread: | Re: proposal to enhance load_tmpl() with default template name., Jason Purdy |
| Next by Thread: | Re: proposal to enhance load_tmpl() with default template name., Mark Stosberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |