MogileFS-Plugin-MultiHook
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
use Test::More tests => 5;
use MogileFS::Server;
use MogileFS::Config;
{
local @ARGV = qw/--skipconfig --plugins MultiHook/;
eval {
MogileFS::Config->load_config;
};
ok(!$@);
ok(MogileFS->can("global_hook"));
ok(MogileFS::register_global_hook("test", sub { my $args = shift; $args->{test} += 1; 1; }));
ok(MogileFS::register_global_hook("test", sub { my $args = shift; $args->{test} *= 2; 1; }));
my $args = { test => 1 };
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.823 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )