in reply to Re: Re: Re:(4): •Re: Upgrade B::Deparse?
in thread Upgrade B::Deparse?
If I save both $getter and $setter in the same batch, I'd expect that when they are restored, they still both share the same secret lexical. I do believe that the current code deparser cannot be used for this at the moment, and that it's a difficult task. The problem is that when you deparse the text for $getter, you have to put some placeholder for $value, and when you deparse $setter, you still have to put some placeholder for that $value. But how do you know the two share the same placeholder?sub return_getter_setter { my $value = shift; (sub { $value }, sub { $value = shift }); } my ($getter, $setter) = return_getter_setter(42);
-- Randal L. Schwartz, Perl hacker
|
|---|