Re: [htmltmpl] Making a Copy of a template object

2008-12-19 Thread Michael Peters
cfaust-dougot wrote: > I'm really trying to split the current template object into 2 different > objects after I've assigned a bunch of things to it (one ends up being > for display and the other gets emailed), Why don't you just create 2 template variables that use the same underlying templat

Re: [htmltmpl] Making a Copy of a template object

2008-12-19 Thread cfaust-dougot
orge.net Subject: Re: [htmltmpl] Making a Copy of a template object Hi Chris, Where you have the statement: $template2 = $template ; Essentially what you are doing here is creating a variable $template2 that points to the same object as referenced by $template. An object in perl is a blessed refer

Re: [htmltmpl] Making a Copy of a template object

2008-12-18 Thread Sébastien Aperghis-Tramoni
cfaust-dougot wrote: > I'm trying to create 2 different vars from the same template object > and it appears once I do so that whatever I set in one gets set in > the other. What am I missing? Is it because I'm creating a > reference? (I didn't think that was the case). This is the case: yo

Re: [htmltmpl] Making a Copy of a template object

2008-12-18 Thread Michael Peters
Damien Clark wrote: > If you wish to make a true copy of the object, you will need to look at > things like Data::Dumper or better still the Storage module which has > freeze and thaw subroutines. Hopefully this will achieve what you want. I think you mean Storable. If you need to have your ob

Re: [htmltmpl] Making a Copy of a template object

2008-12-18 Thread Damien Clark
Hi Chris, Where you have the statement: $template2 = $template ; Essentially what you are doing here is creating a variable $template2 that points to the same object as referenced by $template. An object in perl is a blessed reference and so you have just made a copy of a reference. So $templa