my $scope = $dir->new_scope;
... do work on $dir ...
DESCRIPTIONLive object scopes exist in order to ensure objects don't die too soon if the only other references to them are weak.
When scopes are destroyed the refcounts of the objects they refer to go down, and the parent scope is replaced in the live object set.
- Adds objects or entries, increasing their reference count.
- Clears the objects from the scope object.
Marks this scope as no longer the ``current'' live object scope, if it is the current one.
This allows keeping branching of scopes, which can be useful under long running applications.
- Effectively kills the scope by clearing it and removing it from the live object set.
AUTHORYuval Kogman <[email protected]>
COPYRIGHT AND LICENSEThis software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.