Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed DBUtils method name calls

  • Loading branch information...
commit 3bdcc63394f482c9371c171e777cc7c5a3f04d81 1 parent 63d6622
barbie authored
View
5 CHANGES
@@ -1,6 +1,11 @@
Revision history for Perl module CPAN::Testers::WWW::Reports::Mailer.
+0.10 17/12/2008
+ - added missing README.
+ - fixed DBUtils method name calls.
+
0.09 15/12/2008
+ - convert to use CPAN-Testers-Common-DBUtils
- minor debug output change to make life easier to ensure test runs
match.
- added protection for missing configuration.
View
1  MANIFEST
@@ -5,6 +5,7 @@ lib/CPAN/Testers/WWW/Reports/Mailer.pm
Makefile.PL
MANIFEST
META.yml
+README
t/01base.t
t/90podtest.t
t/91podcover.t
View
6 META.yml
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: CPAN-Testers-WWW-Reports-Mailer
-version: 0.09
+version: 0.10
abstract: CPAN Testers Reports Mailer
author:
- Barbie <barbie@cpan.org>
@@ -12,7 +12,7 @@ installdirs: site
requires:
Compress::Zlib: 0
Config::IniFiles: 0
- CPAN::Testers::Common::DBUtils: 0
+ CPAN::Testers::Common::DBUtils: 0.03
File::Basename: 0
File::Slurp: 0
Getopt::ArgvFile: 0
@@ -28,7 +28,7 @@ requires:
provides:
CPAN::Testers::WWW::Reports::Mailer:
file: lib/CPAN/Testers/WWW/Reports/Mailer.pm
- version: 0.09
+ version: 0.10
meta-spec:
version: 1.4
View
2  Makefile.PL
@@ -6,7 +6,7 @@ WriteMakefile(
'Compress::Zlib' => 0,
'Config::IniFiles' => 0,
- 'CPAN::Testers::Common::DBUtils' => 0,
+ 'CPAN::Testers::Common::DBUtils' => 0.03,
'File::Basename' => 0,
'File::Slurp' => 0,
'Getopt::ArgvFile' => 0,
View
68 README
@@ -0,0 +1,68 @@
+CPAN-Testers-WWW-Reports-Mailer
+===============================
+
+Common database wrapper module used across several CPAN Testers distributions
+and websites.
+
+DEPENDENCIES
+
+The distribution requires the following modules:
+
+ Compress::Zlib
+ Config::IniFiles
+ CPAN::Testers::Common::DBUtils
+ File::Basename
+ File::Slurp
+ Getopt::ArgvFile
+ Getopt::Long
+ LWP::UserAgent
+ Path::Class
+ Parse::CPAN::Authors
+ Template
+ Time::Piece
+
+The following dependencies are require to interact with the databases:
+
+ DBD::mysql
+ DBD::SQLite
+
+INSTALLATION
+
+To install this module, untar the tarball into the directory of choice then
+type the following on the command line (substitute make with nmake or dmake
+if appropriate):
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+Alternatively you may wish to use the CPAN.pm shell or CPANPLUS shell as your
+installer, which will automatically detect uninstalled prerequisities and
+install those too for you.
+
+BUGS, PATCHES & FIXES
+
+There are no known bugs at the time of this release. However, if you spot a
+bug or are experiencing difficulties that are not explained within the POD
+documentation, please submit a bug to the RT system (see link below). However,
+it would help greatly if you are able to pinpoint problems or even supply a
+patch.
+
+Fixes are dependant upon their severity and my availablity. Should a fix not
+be forthcoming, please feel free to (politely) remind me by sending an email
+to barbie@cpan.org .
+
+RT: http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Reports-Mailer
+
+AUTHOR
+
+ Barbie, <barbie@cpan.org>
+ for Miss Barbell Productions <http://www.missbarbell.co.uk>.
+
+COPYRIGHT AND LICENCE
+
+ Copyright (C) 2005-2008 Barbie for Miss Barbell Productions
+
+ This package is free software; you can redistribute it and/or
+ modify it under the same terms as Perl itself.
View
20 lib/CPAN/Testers/WWW/Reports/Mailer.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use vars qw($VERSION);
-$VERSION = '0.09';
+$VERSION = '0.10';
=head1 NAME
@@ -197,7 +197,7 @@ sub check_reports {
# check whether only first instance required
if($prefs->{tuple} eq 'FIRST') {
- my @count = $options{CPANSTATS}->getquery('array',$phrasebook{'GetReportCount'}, $row->{platform}, $row->{perl}, $row->{state}, $row->{id});
+ my @count = $options{CPANSTATS}->get_query('array',$phrasebook{'GetReportCount'}, $row->{platform}, $row->{perl}, $row->{state}, $row->{id});
next if(@count > 1);
}
@@ -208,7 +208,7 @@ sub check_reports {
if($prefs->{version} && $prefs->{version} ne 'ALL') {
if($prefs->{version} eq 'LATEST') {
- my @vers = $options{CPANSTATS}->getquery('array',$phrasebook{'GetLatestDistVers'},$row->{dist});
+ my @vers = $options{CPANSTATS}->get_query('array',$phrasebook{'GetLatestDistVers'},$row->{dist});
next if(@vers && $vers[0]->[0] ne $row->{version});
} else {
$prefs->{version} =~ s/\s*//g;
@@ -268,8 +268,8 @@ sub check_reports {
if(!$prefs->{active} || $prefs->{active} == 0) {
$tvars{subject} = 'Welcome to CPAN Testers';
write_mail('notification.eml',\%tvars);
- $options{CPANPREFS}->doquery($phrasebook{'InsertAuthorLogin'}, time(), $author);
- $options{CPANPREFS}->doquery($phrasebook{'InsertDistPrefs'}, $author, '-');
+ $options{CPANPREFS}->do_query($phrasebook{'InsertAuthorLogin'}, time(), $author);
+ $options{CPANPREFS}->do_query($phrasebook{'InsertDistPrefs'}, $author, '-');
}
my ($reports,@e);
@@ -381,7 +381,7 @@ sub get_author {
return unless($dist && $vers);
unless($authors{$dist} && $authors{$dist}{$vers}) {
- my @author = $options{CPANSTATS}->getquery('array',$phrasebook{'GetAuthor'}, $dist, $vers);
+ my @author = $options{CPANSTATS}->get_query('array',$phrasebook{'GetAuthor'}, $dist, $vers);
$authors{$dist}{$vers} = @author ? $author[0]->[0] : undef;
}
return $authors{$dist}{$vers};
@@ -398,7 +398,7 @@ sub get_prefs {
return $prefs{$author}{dists}{$dist};
}
- my @rows = $options{CPANPREFS}->getquery('hash',$phrasebook{'GetDistPrefs'}, $author,$dist);
+ my @rows = $options{CPANPREFS}->get_query('hash',$phrasebook{'GetDistPrefs'}, $author,$dist);
if(@rows) {
$prefs{$author}{dists}{$dist} = parse_prefs($rows[0]);
return $prefs{$author}{dists}{$dist};
@@ -413,17 +413,17 @@ sub get_prefs {
return $prefs{$author}{default};
}
- my @auth = $options{CPANPREFS}->getquery('hash',$phrasebook{'GetAuthorPrefs'}, $author);
+ my @auth = $options{CPANPREFS}->get_query('hash',$phrasebook{'GetAuthorPrefs'}, $author);
if(@auth) {
$prefs{$author}{default}{active} = $auth[0]->{active} || 0;
- my @rows = $options{CPANPREFS}->getquery('hash',$phrasebook{'GetDefaultPrefs'}, $author);
+ my @rows = $options{CPANPREFS}->get_query('hash',$phrasebook{'GetDefaultPrefs'}, $author);
if(@rows) {
$prefs{$author}{default} = parse_prefs($rows[0]);
$prefs{$author}{default}{active} = $rows[0]->{active} || 0;
return $prefs{$author}{default};
} else {
- $options{CPANPREFS}->doquery($phrasebook{'InsertDistPrefs'}, $author, '-');
+ $options{CPANPREFS}->do_query($phrasebook{'InsertDistPrefs'}, $author, '-');
$active = $prefs{$author}{default}{active};
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.