Aspect...Highest(3pm)

πŸ“¦
version 1.04 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Aspect::Pointcut::Highest β€” the pointcut that stops recursive matching from ruining your whole entire day, bestie πŸ›‘


✨ SYNOPSIS ✨

okay so you wanna use it? two ways, pick your fighter 🫢

use Aspect;

# High-level creation
my $pointcut1 = highest;

# Manual creation
my $pointcut2 = Aspect::Pointcut::Highest->new;

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• if you're writing aspects β€” think timers, think anything built on Aspect::Advice::Around β€” recursion can be a genuinely significant problem. like, lowkey a menace.

the highest pointcut fixes that by matching only on the highest invocation of a function. that's it, that's the whole vibe. ✨

so if that function gets called again recursively inside the first call β€” and we mean at any depth, no matter how deep the rabbit hole goes πŸ‡ β€” those deeper calls will not match, and the advice will not be executed. periodt. πŸ’…


πŸ‘‘ AUTHORS πŸ‘‘

the iconic legends who made this happen:

  • Adam Kennedy <adamk@cpan.org>
  • Marcel GrΓΌnauer <marcel@cpan.org>
  • Ran Eilam <eilara@cpan.org>

Copyright 2001 by Marcel GrΓΌnauer Some parts copyright 2009 - 2013 Adam Kennedy. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

and that's the whole page, bestie 🌸 this lil doc shipped with perl v5.36.0 and was dated 2023-07-02 β€” go forth and slay your recursion problems πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from