[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] REALLY spiffy typeglob code, but with a significant weakness




> This is OK, I suppose, but I'd really like more IO::File-ish behavior
> whereby everything is nicely cleaned up when all of the non-closure
> typeglob references go out of scope.

If you're using 5.6, you can weaken the reference held in the closure, so
that it does not count toward the refcount of the typeglob.

Check out the WeakRef package on CPAN and perldelta in 5.6.

++t


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe