Re: Creating template from string
Michael Graham <magog-4YeSL8/OYKRWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.petal |
|---|---|
| Message-ID | <[email protected]> |
> One thought though - how will Petal cache the complied version of a > template created from a string? Perhaps some sort of 'cache key' could > be passed to the constructor? That's a good question. I initially tried making a Petal subclass that didn't need a filename, but I got foiled by all the file caching stuff. Since we can make strings look like filehandles, would a filehandle work just as well? As for a cache key, maybe you could use "SCALAR(0x813cd9c)" or whatever the stringified version of the scalarref's address is? It would mean that to change the template you'd have to pass in a new string, not just change the existing buffer. Michael -- Michael Graham <magog-4YeSL8/OYKRWk0Htik3J/[email protected]>