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

Chj::Destructor

SYNOPSIS

    use Chj::Destructor;

    my $z = 0;
    {
       my $x = ["foo", Destructor { $z++ }];
    }
    is $z, 1;

DESCRIPTION

Util to help debug or test memory deallocation.

SEE ALSO

Implements: FP::Struct::Show, FP::Abstract::Pure

End.pm, but that one does not type-check the destructor argument early, nor does it localize error variables in its DESTROY method.

NOTE

This is alpha software! Read the status section in the package README or on the website.