Permalink
Browse files

typos & packages fixes

  • Loading branch information...
1 parent c6a3dfb commit 2aeb0e6710350ebd1e8b69880045fd61fdbfa043 @barbie committed Oct 21, 2012
Showing with 56 additions and 43 deletions.
  1. +6 −0 CHANGES
  2. +8 −8 META.json
  3. +8 −8 META.yml
  4. +26 −17 Makefile.PL
  5. +7 −9 lib/CPAN/Testers/Data/Generator.pm
  6. +1 −1 t/12generate.t
View
@@ -1,11 +1,17 @@
Revision history for Perl module CPAN::Testers::Data::Generator.
+1.03 2012-10-21
- spelling fixes. (thanks to Florian Schlichting & Gregor Herrmann).
- AWS values are now configure settings, that can be overridden on the
command line.
- compensate for Amazon SimpleDB's brokeness with dates.
- added parse function for specific GUIDs.
- change file dates changed to meet W3CDTF standards.
+ - META tests no longer require specific versions.
+ - reworked Makefile.PL for clarity.
+ - License updated to Artistic License v2.0.
+ - added minimum perl version (5.006).
+ - added missing prerequisite.
1.02 2012-04-01
- reworked regenerate functionality and script.
View
@@ -1,7 +1,7 @@
{
"name": "CPAN-Testers-Data-Generator",
- "version": "1.02",
- "abstract": "Download and summarize CPAN Testers data.",
+ "version": "1.03",
+ "abstract": "CPAN Testers cpanstats Database Generator",
"author": [
"Barbie (BARBIE) <barbie@cpan.org>"
],
@@ -23,14 +23,14 @@
"prereqs" : {
"runtime" : {
"requires" : {
+ "perl": "5.006",
"Config::IniFiles": "0",
"CPAN::Testers::Common::Article": "0.36",
"CPAN::Testers::Common::DBUtils": "0.03",
"CPAN::Testers::Fact::LegacyReport": "0",
"CPAN::Testers::Fact::TestSummary": "0",
"CPAN::Testers::Metabase::AWS": "0",
"CPAN::Testers::Report": "0",
- "Data::Dumper": "0",
"DBI": "0",
"DBD::mysql": "0",
"DBD::SQLite": "1.07",
@@ -39,6 +39,7 @@
"File::Slurp": "0",
"Getopt::ArgvFile": "0",
"Getopt::Long": "0",
+ "HTML::Entities": "0",
"IO::File": "0",
"JSON": "0",
"Metabase": "0.014",
@@ -49,22 +50,21 @@
},
"test" : {
"requires": {
- "Data::Dumper": "0",
"Test::More": "0.70"
},
"recommends": {
+ "Test::CPAN::Meta": "0",
+ "Test::CPAN::Meta::JSON": "0",
"Test::Pod": "1.00",
- "Test::Pod::Coverage": "0.08",
- "Test::CPAN::Meta": "0.18",
- "Test::CPAN::Meta::JSON": "0.10"
+ "Test::Pod::Coverage": "0.08"
}
}
},
"provides": {
"CPAN::Testers::Data::Generator": {
"file": "lib/CPAN/Testers/Data/Generator.pm",
- "version": "1.02"
+ "version": "1.03"
}
},
"no_index": {
View
@@ -1,23 +1,23 @@
--- #YAML:1.0
name: CPAN-Testers-Data-Generator
-version: 1.02
-abstract: Download and summarize CPAN Testers data
+version: 1.03
+abstract: CPAN Testers cpanstats Database Generator
author:
- Barbie <barbie@cpan.org>
-license: perl
+license: artistic_2
distribution_type: module
installdirs: site
requires:
+ perl: 5.006
Config::IniFiles: 0
CPAN::Testers::Common::Article: 0.36
CPAN::Testers::Common::DBUtils: 0.03
CPAN::Testers::Fact::LegacyReport: 0
CPAN::Testers::Fact::TestSummary: 0
CPAN::Testers::Metabase::AWS: 0
CPAN::Testers::Report: 0
- Data::Dumper: 0
DBI: 0
DBD::mysql: 0
DBD::SQLite: 1.07
@@ -26,25 +26,25 @@ requires:
File::Slurp: 0
Getopt::ArgvFile: 0
Getopt::Long: 0
+ HTML::Entities: 0
IO::File: 0
JSON: 0
Metabase: 0.014
Metabase::Fact: 0
Time::Local: 0
XML::Feed: 0
recommends:
- Test::More: 0.70
+ Test::CPAN::Meta: 0
+ Test::CPAN::Meta::JSON: 0
Test::Pod: 1.00
Test::Pod::Coverage: 0.08
- Test::CPAN::Meta: 0.18
- Test::CPAN::Meta::JSON: 0.10
build_requires:
Test::More: 0.70
provides:
CPAN::Testers::Data::Generator:
file: lib/CPAN/Testers/Data/Generator.pm
- version: 1.02
+ version: 1.03
no_index:
directory:
View
@@ -1,42 +1,51 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use 5.006;
+
use ExtUtils::MakeMaker;
+
WriteMakefile(
- 'NAME' => 'CPAN::Testers::Data::Generator',
- 'VERSION_FROM' => 'lib/CPAN/Testers/Data/Generator.pm',
- 'PREREQ_PM' => {
- 'Getopt::Long' => 0, # only for scripts
- 'Getopt::ArgvFile' => 0, # only for scripts
+ AUTHOR => 'Barbie <barbie@cpan.org>',
+ NAME => 'CPAN::Testers::Data::Generator',
+ VERSION_FROM => 'lib/CPAN/Testers/Data/Generator.pm',
+ ABSTRACT => 'CPAN Testers cpanstats Database Generator',
+ NO_META => 1,
+ PREREQ_PM => {
+
+ # prereqs
'Config::IniFiles' => 0,
'CPAN::Testers::Common::Article' => 0.36,
'CPAN::Testers::Common::DBUtils' => 0.03,
'CPAN::Testers::Fact::LegacyReport' => 0,
'CPAN::Testers::Fact::TestSummary' => 0,
'CPAN::Testers::Metabase::AWS' => 0,
'CPAN::Testers::Report' => 0,
- 'Data::Dumper' => 0,
'File::Basename' => 0,
'File::Path' => 0,
'File::Slurp' => 0,
+ 'HTML::Entities' => 0,
'IO::File' => 0,
'JSON' => 0,
- 'Time::Local' => 0,
- 'XML::Feed' => 0,
'Metabase' => 0.014,
'Metabase::Fact' => 0,
+ 'Time::Local' => 0,
+ 'XML::Feed' => 0,
'DBI' => 0,
'DBD::mysql' => 0,
'DBD::SQLite' => 1.07,
- 'Test::More' => 0.70, # only for testing
- },
+ # used by run scripts
+ 'Getopt::Long' => 0,
+ 'Getopt::ArgvFile' => 0,
- 'PL_FILES' => {},
- 'INSTALLDIRS' => 'site',
- 'EXE_FILES' => [ 'bin/cpanstats' ],
- NO_META => 1,
+ # build/test prereqs
+ 'Test::More' => '0.70'
+
+ },
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT => 'CPAN Testers Database Generator',
- AUTHOR => 'Barbie <barbie@cpan.org>') : ()),
+ EXE_FILES => [ 'bin/cpanstats' ]
);
@@ -4,15 +4,15 @@ use warnings;
use strict;
use vars qw($VERSION);
-$VERSION = '1.02';
+$VERSION = '1.03';
#----------------------------------------------------------------------------
# Library Modules
use Config::IniFiles;
use CPAN::Testers::Common::Article;
use CPAN::Testers::Common::DBUtils;
-use Data::Dumper;
+#use Data::Dumper;
use File::Basename;
use File::Path;
use File::Slurp;
@@ -244,7 +244,7 @@ $self->_log("start=$start, end=$end\n");
# note that because Amazon's SimpleDB can return odd entries out of
# sync, we have to look at previous entries to ensure we are starting
# from the right point
- my $update,$prev,$last) = ($start,$start,$start);
+ my ($update,$prev,$last) = ($start,$start,$start);
while($update le $end && $prev le $end) {
# get list of guids from given start date
@@ -377,7 +377,7 @@ $self->_log("START PARSE\n");
$self->{force} ||= 0;
for my $guid (@guids) {
- $self->_log("GUID [$row->{guid}]");
+ $self->_log("GUID [$guid]");
my ($report,$stored);
unless($hash->{force}) {
@@ -428,7 +428,7 @@ $self->_log("START REPARSE\n");
$self->{check} = $hash->{check} ? 1 : 0;
for my $guid (@guids) {
- $self->_log("GUID [$row->{guid}]");
+ $self->_log("GUID [$guid]");
my $report;
$report = $self->load_fact($guid) unless($hash->{force});
@@ -503,8 +503,8 @@ sub get_next_guids {
my @rows = $self->{METABASE}->get_query('array','SELECT updated FROM metabase ORDER BY updated DESC LIMIT 5');
for my $row (@rows) {
if($self->{time}) {
- my {@dt1) = $self->{time} =~ /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/;
- my {@dt2) = $row->[0] =~ /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/;
+ my (@dt1) = $self->{time} =~ /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/;
+ my (@dt2) = $row->[0] =~ /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)Z/;
my $dt1 = timelocal(reverse @dt1);
my $dt2 = timelocal(reverse @dt2);
@@ -707,7 +707,6 @@ $self->{msg} .= ".. time [$self->{report}{created}][$self->{report}{updated}]";
$self->{report}{type} = 3;
}
- #use Data::Dumper;
#print STDERR "\n====\nreport=".Dumper($self->{report});
return 1 unless($self->_valid_field($guid, 'dist' => $self->{report}{dist}) || ($options && $options->{exclude}{dist}));
@@ -1137,7 +1136,6 @@ sub _check_arch_os {
#print STDERR "_check: osname=$self->{report}{osname}\n";
return if($text && $self->{report}{osname} && lc $text eq lc $self->{report}{osname});
-#use Data::Dumper;
#print STDERR "_check: metabase=".Dumper($self->{report}{metabase})."\n";
my $fact = decode_json($self->{report}{metabase}{'CPAN::Testers::Fact::LegacyReport'}{content});
my $textreport = $fact->{textreport};
View
@@ -14,7 +14,7 @@ use Config::IniFiles;
use CPAN::Testers::Common::DBUtils;
use CPAN::Testers::Data::Generator;
use CPAN::Testers::Metabase::AWS;
-use Data::Dumper;
+#use Data::Dumper;
use File::Path;
use IO::File;
use JSON;

0 comments on commit 2aeb0e6

Please sign in to comment.