App-Info
view release on metacpan or search on metacpan
lib/App/Info.pm view on Meta::CPAN
=cut
##############################################################################
# This code reference is used by the event methods to manage the stack of
# event handlers that may be available to handle each of the events.
my $handler = sub {
my ($self, $meth, $params) = @_;
# Sanity check. We really want to keep control over this.
Carp::croak("Cannot call protected method $meth()")
unless UNIVERSAL::isa($self, scalar caller(1));
# Create the request object.
$params->{type} ||= $meth;
my $req = App::Info::Request->new(%$params);
# Do the deed. The ultimate handling handler may die.
foreach my $eh (@{$self->{"on_$meth"}}) {
last if $eh->handler($req);
}
( run in 0.363 second using v1.01-cache-2.11-cpan-cc502c75498 )