DOKK / manpages / debian 12 / libaspect-perl / Aspect::Pointcut::Returning.3pm.en
Aspect::Pointcut::Returning(3pm) User Contributed Perl Documentation Aspect::Pointcut::Returning(3pm)

Aspect::Pointcut::Returning - Function returning without exception

  use Aspect;
  
  # Don't trap Foo::Exception object exceptions
  after {
      $_->return_value(1)
  } call 'Foo::bar' & returning;

The Aspect::Pointcut::Returning pointcut is used to match situations in which "after" advice should NOT run when the function is throwing an exception.

Adam Kennedy <adamk@cpan.org>

Copyright 2009 - 2013 Adam Kennedy.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2022-06-08 perl v5.34.0