Aspect::Point::Functions3pm
Allow point context methods to be called as functions
Usage
use Aspect::Point::Functions;# This code is equivalent to the SYNOPSIS for Aspect::Pointmy $advice_code = sub {print type; # The advice type ('before')print pointcut; # The matching pointcut ($pointcut)print enclosing; # Access cflow pointcut advice contextprint sub_name; # The full package_name::sub_nameprint package_name; # The package name ('Person')print short_name; # The sub name (a get or set method)print self; # 1st parameter to the matching subprint (args)[1]; # 2nd parameter to the matching suboriginal->( x => 3 ); # Call matched sub independentlyreturn_value(4) # Set the return value};
Overview
In the AspectJ toolkit for Java which Aspect is inspired by, the join point context information is retrieved through certain keywords.
In Aspect this initially proved too difficult to achieve without heavy source code rewriting, and so an alternative approach was taken using a topic object and methods.
This experimental package attempts to implement the original function/keyword style of call.
It is considered unsupported at this time.
Releases
7 releases since Debian 7 (Wheezy); the text changed 4 times.