The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Aspect::JoinPoint::Return - Class representing a return join point

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 return join point.

METHODS

This class inherits from Aspect::JoinPoint::Sub. In addition, it implements and/or overrides the following methods:

as_string()

This method, which is called automatically via overloading if a reference to an object of this type is printed. It returns a string saying that it is a return join point and also gives the name of the subroutine this join point belongs to.

install(coderef)

This method takes a coderef (to advice code) and installs it at a location appropriate to this call join point, i.e. as a postwrapper for the affected subroutine using Hook::LexWrap. See that manpage for what this means for the advice code, noting especially that caller and wantarray information are preserved and that the wrapped subroutine's return value can be overridden.

The method returns handles to the installed advice code that can be dealt with lexically as described for handlers() in the Aspect::Modular manpage.

Note the potential use of the $::thisjp variable in the advice code as described in Aspect::JoinPoint.

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).