diff --git a/Changes b/Changes index d988645..a2f3cfc 100644 --- a/Changes +++ b/Changes @@ -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. diff --git a/MANIFEST b/MANIFEST index d7c4a52..e6ebf80 100644 --- a/MANIFEST +++ b/MANIFEST @@ -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 diff --git a/MYMETA.json b/MYMETA.json deleted file mode 100644 index 21e82e4..0000000 --- a/MYMETA.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "abstract" : "Limit data throughput", - "author" : [ - "Mike Schilli " - ], - "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120351", - "license" : [ - "unknown" - ], - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" - }, - "name" : "Data-Throttler", - "no_index" : { - "directory" : [ - "t", - "inc" - ] - }, - "prereqs" : { - "build" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "configure" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "runtime" : { - "requires" : { - "Log::Log4perl" : "1", - "Set::IntSpan" : "0", - "YAML" : "0.62" - } - } - }, - "release_status" : "stable", - "resources" : { - "repository" : { - "url" : "http://github.com/mschilli/data-throttler-perl" - } - }, - "version" : "0.06" -} diff --git a/MYMETA.yml b/MYMETA.yml deleted file mode 100644 index 7de1ff1..0000000 --- a/MYMETA.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -abstract: 'Limit data throughput' -author: - - 'Mike Schilli ' -build_requires: - ExtUtils::MakeMaker: 0 -configure_requires: - ExtUtils::MakeMaker: 0 -dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120351' -license: unknown -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: Data-Throttler -no_index: - directory: - - t - - inc -requires: - Log::Log4perl: 1 - Set::IntSpan: 0 - YAML: 0.62 -resources: - repository: http://github.com/mschilli/data-throttler-perl -version: 0.06 diff --git a/Makefile.PL b/Makefile.PL index 18fc11d..4052d54 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 => { @@ -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, @@ -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 ') : ()), + + ($mm_ver >= 6.31 + ? (LICENSE => 'perl') + : () + ), + + ($mm_ver >= 6.48 + ? (MIN_PERL_VERSION => 5.006) + : () + ), + ); diff --git a/Throttler.pm b/lib/Data/Throttler.pm similarity index 97% rename from Throttler.pm rename to lib/Data/Throttler.pm index 77378b1..fdb1e12 100644 --- a/Throttler.pm +++ b/lib/Data/Throttler.pm @@ -1,6 +1,7 @@ ########################################### package Data::Throttler; ########################################### +use 5.006; use strict; use warnings; use Log::Log4perl qw(:easy); @@ -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, @@ -866,7 +867,20 @@ will print out something like and allow for further investigation. -=head1 LEGALESE +=head1 SEE ALSO + +L - another general-purpose throttling module. +It claims to be faster than C, and also has Memcached support. + +L - rate limit synchronous and asynchronous function calls. + +L - a plugin for C that lets you +throttle by quantity of some resource(s). + +L - 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