Syntactic Confectionery Delight | |
PerlMonks |
Error.pm vs closure issue fixed in Perl > 5.8.4 ?by npf (Initiate) |
on Sep 01, 2008 at 16:45 UTC ( [id://708258]=perlquestion: print w/replies, xml ) | Need Help?? |
npf has asked for the wisdom of the Perl Monks concerning the following question:
Hello !
I recently began to play with Perl exception mechanisms, and gave a try to the Error module with the "try/catch" syntax. However, reading docs ( Matt Sergeant presentation), I discovered that it presents a serious issue with regard to closures, and creates memory leaks. But I also read in the DDJ article from Dave Rolsky that Perl >= 5.8.4 might fix the closure issue ? Trying the test sample provided in the presentation: I indeed notice that the output result changes between perl 5.6.1: and Perl 5.10.0: The object seems indeed destroyed when leaving the loop's scope. Can we then consider that this closure issue when using the "try/catch" syntax of the Error package is over ? Is it now advisable to use the Error module with the "try/catch" syntax ? Nothing appears indeed in the perl584delta.pod about closures. Regards, Pierre
Back to
Seekers of Perl Wisdom
|
|