Aspect
view release on metacpan or search on metacpan
lib/Aspect/Advice/After.pm view on Meta::CPAN
use Carp ();
use Sub::Uplevel ();
use Aspect::Hook ();
use Aspect::Advice ();
use Aspect::Point ();
our $VERSION = '1.04';
our @ISA = 'Aspect::Advice';
# NOTE: To simplify debugging of the generated code, all injected string
# fragments will be defined in $UPPERCASE, and all lexical variables to be
# accessed via the closure will be in $lowercase.
sub _install {
my $self = shift;
my $pointcut = $self->pointcut;
my $code = $self->code;
my $lexical = $self->lexical;
# Get the curried version of the pointcut we will use for the
# runtime checks instead of the original.
# Because $MATCH_RUN is used in boolean conditionals, if there
lib/Aspect/Pointcut/Call.pm view on Meta::CPAN
# Constructor Methods
# The constructor stores three values.
# $self->[0] is the original specification provided to the constructor
# $self->[1] is a function form of the condition that has a sub name passed
# in and returns true if matching or false if not.
# $self->[2] is a function form of the condition that has the sub name set as
# the topic variable.
# $self->[3] is a function form of the condition that has the join point object
# set as the topic variable.
# $self->[4] is either a string Perl fragment that can be eval'ed with $_ set
# as the sub name, or a function that can be called with $_ set as
# the sub name.
# $self->[5] is either a string Perl fragment that can be eval'ed with $_ set
# as the join point variable, or a function that can be called with
# $_ set as the join point variable.
# All of 1-5 return true of the condition matches, or false if not.
sub new {
my $class = shift;
my $spec = shift;
if ( Params::Util::_STRING($spec) ) {
my $string = '"' . quotemeta($spec) . '"';
return bless [
$spec,
( run in 1.565 second using v1.01-cache-2.11-cpan-b16cb0d3907 )