The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

KiokuDB::LiveObjects::Scope - Scope helper object

SYNOPSIS

    {
        my $scope = $dir->new_scope;

        ... do work on $dir ...
    }

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.