[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Re: proposal to enhance load_tmpl() with default template name.


( Sorry about the bad threading. )

On Wed, Aug 24, 2005 at 03:52:43PM -0400, Jason Purdy wrote:
> Can it also look for .TMPL, too?  Or maybe make the suffix a config'able
> parameter in the setup()?  I picked up that .TMPL nomenclature from the
> HTML::Template docs and I just can't stop!

I thought about the extension issue while I was having some chocolate cream pie
earlier.

I would make the extension a variable and have it used /after/ the
load_tmpl hook, giving the hook a chance to effect it. It might also get
a accessor/mutator method so it can be set. We might still the names for
this from AnyTemplate to be consistent. 

> 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, ... );

I don't see why these couldn't be supported, since currently

load_tmpl($scalar_ref)

and 

load_tmpl($file_handle)

Would also currently produce errors, I think. It should be simple matter
of checking to see what we have and Doing the Right Thing.  

I'm less interested in that feature, personally. Someone is welcome to
submit the code/tests/docs trinity for it. It seems easy enough...

    Mark
 
--
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   suppressed     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


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


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.