Devel::...t::State(3)

πŸ“¦
version 0.08 Β· 2 versions
, in fedora 43

πŸ’– Devel::LeakGuard::Object::State β€” the perl(3) page but make it cute πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation section 3 ✨ this one is literally about catching object leaks, and it's called Devel::LeakGuard::Object::State. it's giving scoped. it's giving leak-checking. it's giving main character energy 🫢


πŸŽ€ NAME πŸŽ€

Devel::LeakGuard::Object::State β€” scoped object leak checking πŸ¦‹

no cap, that's the whole name. object leak checking, but scoped, like with a lil start and a lil end. obsessed πŸ’…


⭐ VERSION ⭐

this doc describes Devel::LeakGuard::Object::State version 0.08 β€” so you know exactly which era of slay we're in ✨


🌸 SYNOPSIS 🌸

here's the vibe, copy it, live it:

use Devel::LeakGuard::Object::State;

# Later
my $leakstate = Devel::LeakGuard::Object::State->new(
    on_leak => 'die'
);

My::Thing->leaky();

$leakstate->done;

like, you make the state object, you run whatever messy code you're suspicious about, then you hit done and it tells you if stuff leaked 😭 iconic workflow fr fr


πŸ’œ DESCRIPTION πŸ’œ

so a Devel::LeakGuard::Object::State captures the current leakstate of object allocations inside your program. think of it as a lil polaroid of what's allocated rn πŸ“Έ

then, when you call done, it compares that saved allocation leakstate against the current leakstate and reports any discrepancies</> πŸ‘‘ if nothing changed, great, slay. if things drifted? it tells you. periodt.


✨ INTERFACE ✨

🧚 new

create a brand new Devel::LeakGuard::Object::State πŸ’– you can pass it a bunch of options, bestie. and like, the full list of options? it lives over in leakguard in Devel::LeakGuard::Object β€” go peek there for the whole menu πŸ“

πŸ¦‹ done

call done at the end of the chunk of code you're leak-checking, okay? that's the moment of truth πŸ’…

if it detects allocation imbalances, the action taken depends entirely on the options you passed to new. and by default? a warning is displayed 🌈 that's it, that's the default, no drama, just a warning.


πŸ‘‘ AUTHOR πŸ‘‘

andy armstrong, <andy@hexten.net> β€” ty for your service king 🫢✨


copyright (c) 2009-2015, andy armstrong <andy@hexten.net>.

this module is free software; you can redistribute it and/or modify it under the same terms as perl itself. see perlartistic πŸ“œ


πŸ’€ heads up bestie: same terms as perl itself, so go read perlartistic if you wanna know the exact legal tea. don't just vibe-guess it πŸ™ˆ

and that's the whole page, fr fr πŸ’– brought to you by perl v5.42.0, dated 2025-07-25 β€” love that for us, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from