Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 30 additions & 20 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
######################################################################
Revision history for Perl extension Data::Throttler
Revision history for Perl module Data::Throttler

0.06 (2013/05/23)
(ms) [rt.cpan.org 85325] Added better diagnostics in case locking
of db_file fails, as suggested by Nigel Horne.
0.07 2014-12-?? MSCHILLI
- Added a SEE ALSO section with links to similar modules.
- Added min perl version and license type to metadata, and min perl
version to code.
- Deleted MYMETA.*, since META files will be generated by EUMM.
- Renamed the LEGALESE section to be LICENSE AND COPYRIGHT,
which means that tools like CPANTS will find it.
- Moved Throttler.pm to lib/Data/, which is the usual convention these days
- Reformatted this file according to CPAN::Changes::Spec, and corrected
some of the dates, where were off-by-one, due to 'CPAN time' being GMT

0.05 (2010/07/09)
(ms) Disabling YAML checks if YAML isn't present
0.06 2013-05-24 MSCHILLI
- [rt.cpan.org 85325] Added better diagnostics in case locking
of db_file fails, as suggested by Nigel Horne.

0.04 (2010/05/01)
(ms) Added github repository link to Makefile.PL
(ms) Daniel Westermann-Clark added reset_key() method
0.05 2010-07-10 MSCHILLI
- Disabling YAML checks if YAML isn't present

0.03 (2009/06/27)
(ms) Replaced DBM::Deep by YAML backend
(ms) Fixed bug RT47189 (reported by Jools Smyth)
(ms) Text::ASCIITable is now optional
0.04 2010-05-01 MSCHILLI
- Added github repository link to Makefile.PL
- Daniel Westermann-Clark added reset_key() method

0.02 (2008/03/07)
(ms) Persistent file now only modified on write attempts. This allows
for read attempts without knowing the bucket parameters of a
throttler data file.
0.03 2009-06-28 MSCHILLI
- Replaced DBM::Deep by YAML backend
- Fixed bug RT47189 (reported by Jools Smyth)
- Text::ASCIITable is now optional

0.01 (2007/04/08)
(ms) Where it all began.
0.02 2008-03-08 MSCHILLI
- Persistent file now only modified on write attempts. This allows
for read attempts without knowing the bucket parameters of a
throttler data file.

0.01 2007-04-08 MSCHILLI
- Where it all began.
4 changes: 1 addition & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ eg/persist
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
MYMETA.json
MYMETA.yml
README
t/001Basic.t
t/002File.t
t/003Bug.t
Throttler.pm
lib/Data/Throttler.pm
48 changes: 0 additions & 48 deletions MYMETA.json

This file was deleted.

26 changes: 0 additions & 26 deletions MYMETA.yml

This file was deleted.

21 changes: 19 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
######################################################################
use ExtUtils::MakeMaker;

my $mm_ver = $ExtUtils::MakeMaker::VERSION;
if ($mm_ver =~ /_/) { # dev version
$mm_ver = eval $mm_ver;
die $@ if $@;
}

my $meta_merge = {
META_MERGE => {
resources => {
Expand All @@ -13,7 +19,7 @@ my $meta_merge = {
};
WriteMakefile(
'NAME' => 'Data::Throttler',
'VERSION_FROM' => 'Throttler.pm', # finds $VERSION
'VERSION_FROM' => 'lib/Data/Throttler.pm', # finds $VERSION
'PREREQ_PM' => {
Set::IntSpan => 0,
Log::Log4perl => 1.0,
Expand All @@ -22,6 +28,17 @@ WriteMakefile(
}, # e.g., Module::Name => 1.1
$ExtUtils::MakeMaker::VERSION >= 6.50 ? (%$meta_merge) : (),
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'Throttler.pm',
(ABSTRACT_FROM => 'lib/Data/Throttler.pm',
AUTHOR => 'Mike Schilli <[email protected]>') : ()),

($mm_ver >= 6.31
? (LICENSE => 'perl')
: ()
),

($mm_ver >= 6.48
? (MIN_PERL_VERSION => 5.006)
: ()
),

);
18 changes: 16 additions & 2 deletions Throttler.pm → lib/Data/Throttler.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
###########################################
package Data::Throttler;
###########################################
use 5.006;
use strict;
use warnings;
use Log::Log4perl qw(:easy);
Expand Down Expand Up @@ -835,7 +836,7 @@ a requirement for Data::Throttler on purpose.
So the code

use Data::Throttler;

my $throttler = Data::Throttler->new(
interval => 3600,
max_items => 10,
Expand Down Expand Up @@ -866,7 +867,20 @@ will print out something like

and allow for further investigation.

=head1 LEGALESE
=head1 SEE ALSO

L<Data::Valve> - another general-purpose throttling module.
It claims to be faster than C<Data::Throttler>, and also has Memcached support.

L<Sub::Throttler> - rate limit synchronous and asynchronous function calls.

L<Sub::Throttler::Limit> - a plugin for C<Sub::Throttler> that lets you
throttle by quantity of some resource(s).

L<Schedule::RateLimiter> - provides a way to "restrict how many times
a given action may take place within a given time frame".

=head1 LICENSE AND COPYRIGHT

Copyright 2007 by Mike Schilli, all rights reserved.
This program is free software, you can redistribute it and/or
Expand Down