On Mon, 20 May 2002, F. Xavier Noria wrote: > On Sun, 19 May 2002 23:34:24 -0400 > "Perrin Harkins" <[EMAIL PROTECTED]> wrote: > > : Leaks are caused by circular references, the string form of eval (at > : least it used to leak a little), nested closures (sometimes created > : accidentally with the Error module) > > I am using the Error module in my current project, what kind of > constructs should one avoid? Is this safe? > > my $um = UserManager->new; > # ... > try { > $um->write_user($user); > $um->dbh->commit; > } catch Exception::DB with { > my $e = shift; > debug "Exception: $e"; > $um->dbh->rollback; > };
No. $um is caught in a closure, which could potentially leak. -- <!-- Matt --> <:->Get a smart net</:->