NAME
Aspect::PointCut::Calls - Represents a calls() pointcut operator
SYNOPSIS
There is no synopsis, as this class is only used within Aspects; if you develop Aspect internals, you'll know how to use it. If not, you don't need to. If you're curious, read the source.
DESCRIPTION
This class represents a pointcut of call join points whose subroutine name matches a given criteria. An object of this type is most commonly constructed using the calls()
function, or pointcut operator, that is provided by the Aspect
module.
The match criteria can be given as an argument to the constructor or set explicitly with the spec
method.
METHODS
This class inherits from Aspect::PointCut::Sub
. In addition, it implements and/or overrides the following methods:
new([STRING|REGEX|CODEREF])
-
This is the constructor. It can optionally be given a pointcut specification, which will be passed to the
spec
method. spec(STRING|REGEX|CODEREF)
-
This method sets or returns (if called without arguments) the pointcut's specifier. This pointcut matches call join points at which the called sub's name matches the argument. "Matches" here means that if the argument is a literal string, then the condition must be exactly the same to match. If the argument is a regex, then the condition is matched against it. And if the argument is a coderef, it is executed with the condition as an argument and the return value is taken as a boolean value of whether there was a match or not.
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).