logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Aspect::Pointcut::Wantarray - A pointcut for the run-time wantarray context

Authors

       Adam Kennedy <adamk@cpan.org>

Description

       The "Aspect::Pointcut::Wantarray" pointcut allows the creation of aspects that only trap calls made in a
       particular calling context (list, scalar or void).

Name

       Aspect::Pointcut::Wantarray - A pointcut for the run-time wantarray context

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
         );

See Also