Jeffrey Ray Hallock > Storm-0.19 > Storm::LiveObjects::Scope

Download:
Storm-0.19.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.19   Source   Latest Release: Storm-0.240

NAME ^

Storm::LiveObjects::Scope - Scope helper object

SYNOPSIS ^

    {
        my $scope = $storm->new_scope;
        
        ... do work on objects ...
    }

DESCRIPTION ^

Live 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.

METHODS ^

push

Adds objects or entries, increasing their reference count.

clear

Clears the objects from the scope object.

SEE ALSO ^

Modified from code in KiokuDB::LiveOBjects::Scope by Yuval Kogman.

syntax highlighting: