Re: Using <> on non-filehandles

2003-10-21 Thread Nicholas Thornton
--- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > While that's an admirable goal, allow me to > challenge that on > a few points. Does it change matters if I point out that I'm not intending to publish the module, but rather just use it for personal convenience? (There are a few programs I'

Re: Using <> on non-filehandles

2003-10-21 Thread Nicholas Thornton
--- Thilo Planz <[EMAIL PROTECTED]> wrote: > Okay, in that case you probably know what you are > doing. Sometimes I like to think so ;) Yeah, If I'm looking for "how to do X" the first place I look is usually CPAN; If I know how to do it I'll sometimes still look on CPAN. One of the things that's

Re: Using <> on non-filehandles

2003-10-21 Thread Randal L. Schwartz
> "Nicholas" == Nicholas Thornton <[EMAIL PROTECTED]> writes: Nicholas> I've looked at various templating modules on CPAN. The Nicholas> reason I'm writing my own is because the templating Nicholas> modules I've seen on CPAN are either too robust (undue Nicholas> increase in loading time), or

Re: Using <> on non-filehandles

2003-10-21 Thread Thilo Planz
I'm working on a template-reading module Are you sure you need to do that ? I've looked at various templating modules on CPAN. The reason I'm writing my own is because the templating modules I've seen on CPAN are either too robust (undue increase in loading time), or don't have the features I want,

Re: Using <> on non-filehandles

2003-10-21 Thread Nicholas Thornton
--- Thilo Planz <[EMAIL PROTECTED]> wrote: > --- wren wrote: > > I'm working on a template-reading module > > Are you sure you need to do that ? I've looked at various templating modules on CPAN. The reason I'm writing my own is because the templating modules I've seen on CPAN are either too rob

Re: Using <> on non-filehandles

2003-10-21 Thread Nicholas Thornton
--- David Wheeler <[EMAIL PROTECTED]> wrote: > Store the template in an array instead of a > scalar? d'oh! Yeh that should work, shoulda thought of it. The sub that reads the template returns a hash (so you can have sections to the template like header, footer, paragraph,...), but turning it into

Re: Using <> on non-filehandles

2003-10-21 Thread Thilo Planz
I'm working on a template-reading module and I have a question. Are you sure you need to do that ? Templating modules are already extremely over-implemented and you should be able to find a suitable one on CPAN. Here are some articles about the topic: http://twiki.med.yale.edu/twiki2/bin/view/CG

Re: Using <> on non-filehandles

2003-10-20 Thread David Wheeler
On Monday, October 20, 2003, at 10:51 PM, Nicholas Thornton wrote: So I was wondering, is there any good equivalent I can use so that i don't have to slurp the whole file up at once to regex? Store the template in an array instead of a scalar? my @template = <>; for (@template) {...} HTH, Dav

Using <> on non-filehandles

2003-10-20 Thread Nicholas Thornton
I'm working on a template-reading module and I have a question. I'm using a regex to pluck out the references to data and replace them with the data itself, and the template file can be very long. If I were reading straight from the file and interpolating I could use a good ol' while(<>){} loop to