Re: [Boston.pm] quick XML::Twig / variable scope problem

2007-08-25 Thread Ted Zlatanov
On Fri, 24 Aug 2007 19:32:05 -0400 Alex Brelsfoard [EMAIL PROTECTED] wrote: AB I would like to call a function that declares a few variables and then runs AB some XML::Twig processes which in turn access update said original AB variables. AB But I'm getting an error from my twig functions when

Re: [Boston.pm] quick XML::Twig / variable scope problem

2007-08-25 Thread Duane Bronson
No, don't use globals. I'm pretty sure (read: too lazy to test) that you can send an anonymous subroutine like this: my $localobject = new MyTwigClass($catalog_timestamp); twig_handlers = { 'Catalog' = sub { return $localobjext-get_catalog_timestamp(); }, } $localobject will not get garbage