Aspect...ntarray(3pm)
β¨ NAME β¨
Aspect::Pointcut::Wantarray β bestie, it's a pointcut for the run-time wantarray context π
(yes, the vibe check happens at runtime, iconic)
πΈ SYNOPSIS πΈ
use Aspect;
# High-level creation
my $pointcut1 = wantlist | wantscalar | wantvoid;
# Manual creation
my $pointcut2 = Padre::Pointcut::Or->new(
Padre::Pointcut::Wantarray->new( 1 ), # List
Padre::Pointcut::Wantarray->new( 0 ), # Scalar
Padre::Pointcut::Wantarray->new( undef ), # Void
);
okay so literally two ways to do it: the easy high-level glow-up, or the manual hand-crafted artisanal build π and note that 1 is List, 0 is Scalar, and undef is Void β no cap, that's the whole mapping, don't get it twisted π
π¦ DESCRIPTION π¦
The Aspect::Pointcut::Wantarray pointcut lets you create aspects that only trap calls made in a particular calling context β and the contexts on the menu are list, scalar, or void. that's it, that's the serve β¨
likeβ¦ it's giving "I only care about you when you're in scalar context" energy, and honestly? valid π
π AUTHORS π
Adam Kennedy <adamk@cpan.org> β the one and only, main character energy fr fr π«Ά
π COPYRIGHT π
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. periodt π
and that's the whole page, bestie β you got this π this lil beauty is from the Perl user-contributed docs, perl v5.36.0, dated 2023-07-02, filed under Aspect...ntarray(3pm). now go write some pointcuts and slay β¨π¦π
π¦ where this page comes from
- debian trixie: libaspect-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libaspect-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libaspect-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libaspect-perl 1.04-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms