SVK::Ed...nCleanup(3)

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

πŸ’– NAME πŸ’–

SVK::Editor::TxnCleanup β€” bestie, it's an editor that aborts a txn when it is aborted. that's the whole gig. no cap. ✨

so real quick, this page lives in the manual as SVK::Ed...nCleanup(3) (the terminal truncates it, she's dramatic like that πŸ’…), and she's part of the User Contributed Perl Documentation collection.


✨ SYNOPSIS ✨

okay so here's the vibe in code form 🫢

my $editor = ...
# stack the txn cleanup editor on
$editor = SVK::Editor::TxnCleanup-> (_editor => [$editor], txn => $txn );
# ... do some stuff ...
$editor->abort_edit;
# $txn->abort gets called.

so you start with some $editor, then you stack the txn cleanup editor on top of it by wrapping it β€” passing your existing editor through _editor => [$editor] and handing over your txn => $txn. after that you do your little ... do some stuff ... era πŸ™ˆ, and whenever you hit $editor->abort_edit, the cleanup kicks in and $txn->abort gets called for you. iconic behaviour honestly. it's giving responsible cleanup. πŸ‘‘

ngl the whole point is that you don't have to remember to abort the txn yourself β€” the editor handles it the moment the edit gets aborted. periodt. πŸ’…

that's literally the entire page, bestie β€” short and slay πŸŒΈπŸ¦‹

this gem came to you courtesy of the User Contributed Perl Documentation, perl v5.42.0, dated 2025-07-25 πŸ’œ mwah, go forth and abort responsibly πŸŽ€

πŸ“¦ where this page comes from