
Data::Valve - Throttle Your Data

use Data::Valve;
my $valve = Data::Valve->new(
max_items => 10,
interval => 30
);
if ($valve->try_push()) {
print "ok\n";
} else {
print "throttled\n";
}
if ($valve->try_push(key => "foo")) {
print "ok\n";
} else {
print "throttled\n";
}

Data::Valve is a throttler based on Data::Throttler.
Currently only throttles within a single process. More to come soon


Daisuke Maki <daisuke@endeworks.jp>

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