NAME
Aspect::JoinPoint - Superclass for all types of join points
SYNOPSIS
use Aspect::JoinPoint;
print "$_\n" for @{ Aspect::JoinPoint::enum(@_) };
DESCRIPTION
This is the superclass for all types of join points.
METHODS
This class implements the following methods:
new([args])
-
This is the constructor. It creates the object, then calls
init()
to handle any arguments that were passed to the constructor.w init([args])
-
This method initializes newly constructed objects. It doesn't do anything in this class, but can be overridden in subclasses representing specific types of join points to handle arguments appropriate to that type of join point.
enum([packages])
-
This is a class method that enumerates, as a list, all join points in existence within the current program and returns a reference to that list.
If no argument is given to this method, all join points from all 'user packages' will be enumerated. See the description
get_user_packages()
in the manpage ofAspect::Symbol::Enum
for what that means.If given a list of package names, only join points in those packages will be enumerated, even if those packages are not user packages.
install(coderef)
-
This method is used to install advice code on a join point. It doesn't do anything in this class, but can be overridden in subclasses representing specific types of join points to install the code as appropriate for that type of join point.
The advice code can make use of the
$::thisjp
variable, which holds a reference to the object representing the current join point, i.e. the join point that the advice code was invoked for. One example use for that is that the advice can find out the name of a call join point's subroutine (via thesub
method described inAspect::JoinPoint::Sub
), which is necessary for tracing the call flow (also seeAspect::Trace
).
BUGS
None known so far. If you find any bugs or oddities, please do inform the author.
AUTHOR
Marcel Grünauer <marcel@cpan.org>
COPYRIGHT
Copyright 2001-2002 Marcel Grünauer. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1), Aspect::Intro(3pm), Aspect::Overview(3pm).