Aspect::Pointcut::If(3pm)

Aspect::Pointcut::If3pm

Pointcut that allows arbitrary perl code

Usage

  use Aspect;
  
  # High-level creation
  my $pointcut1 = if_true { rand() > 0.5 };
  
  # Manual creation
  my $pointcut2 = Aspect::Pointcut::If->new(
    sub { rand() > 0.5 }
  );

Overview

Because Aspect's weaving phase technically occurs at run-time (relative to the overall process) it does not need to be limit itself only to conditions that are fully describable at compile-time.

Aspect::Pointcut::If allows you to take advantage of this to create your own custom run-time pointcut conditions, although for safety and purity reasons you are not permitted to create custom conditions that interact with the Aspect::Point object for the call.

Authors

Adam Kennedy <[email protected]>

Marcel Gruenauer <[email protected]>

Ran Eilam <[email protected]>

From libaspect-perl 0.90-1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.