/usr/share/perl5/Dizzy/Handlers.pm is in dizzy 0.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | package Dizzy::Handlers;
use strict;
use warnings;
my %handlers;
my %handlers_last;
sub GO_ON() { 1; }
sub STOP() { 0; }
sub invoke {
my ($name, @args) = @_;
my $ret;
foreach my $handler (@{$handlers{$name}}, @{$handlers_last{$name}}) {
$ret = $handler->(@args);
last if ($ret == STOP);
}
}
sub register {
while (my ($name, $code) = splice(@_, 0, 2)) {
push(@{$handlers{$name}}, $code);
}
}
sub register_last {
while (my ($name, $code) = splice(@_, 0, 2)) {
push(@{$handlers_last{$name}}, $code);
}
}
1;
|