Aspect

 view release on metacpan or  search on metacpan

lib/Aspect/Library/Listenable.pm  view on Meta::CPAN

you to define listenables and the events they fire. Then you can
add/remove listeners to these listenables. When specific methods of the
listenable are called, registered listeners will be notified.

Some examples of use are:

=over 4

=item *

A timer that allows registration of listeners. They will receive events
when the timer fires.

=item *

In an MVC application, as a mechanism for registering views as listeners
of models. Then when models change, views receive events, which they
handle by updating the display. Several views can be set as listeners for
any event of any model.

=back

lib/Aspect/Pointcut/Highest.pm  view on Meta::CPAN

  use Aspect;
  
  # High-level creation
  my $pointcut1 = highest;
  
  # Manual creation
  my $pointcut2 = Aspect::Pointcut::Highest->new;

=head1 DESCRIPTION

For aspects including timers and other L<Aspect::Advice::Around|around>-based
advice, recursion can be significant problem.

The C<highest> pointcut solves this problem by matching only on the highest
invocation of a function. If the function is called again recursively within
the first call, at any depth, the deeper calls will be not match and the
advice will not be executed.

=head1 AUTHORS

Adam Kennedy E<lt>adamk@cpan.orgE<gt>



( run in 1.066 second using v1.01-cache-2.11-cpan-49f99fa48dc )