Skip to content
Browse files

Merge pull request #6 from dagolden/pausehack

Pausehack -- apply *after* or *instead of* rjbs' pull request
  • Loading branch information...
2 parents 49e1919 + 50e39e0 commit b903f9aeaf4e582d0ab794d1f48476d9128b49de @andk committed Aug 16, 2011
Showing with 16 additions and 10 deletions.
  1. +2 −0 Makefile.PL
  2. +2 −7 lib/PAUSE/mldistwatch.pm
  3. +12 −3 t/lib/PAUSE/TestPAUSE.pm
View
2 Makefile.PL
@@ -20,7 +20,9 @@ WriteMakefile(
Class::Singleton
Compress::Zlib
Cwd
+ DB_File
DBI
+ DBIx::RunSQL
Devel::Peek
Dumpvalue
Email::Address
View
9 lib/PAUSE/mldistwatch.pm
@@ -57,7 +57,7 @@ use DB_File;
use Fcntl qw(O_RDWR O_CREAT);
use File::Find;
use File::Path qw(rmtree mkpath);
-our $Id = q$Id$;
+our $Id = "PAUSE version $PAUSE::VERSION";
our $MAINTAIN_SYMLINKTREE = 1;
use Fcntl qw(:flock);
@@ -121,7 +121,6 @@ sub sleep {
sub verbose {
my($self,$level,@what) = @_;
- our $Id;
unless (@what) {
@what = ("warning: verbose called without \@what: ", $level);
$level = 1;
@@ -464,7 +463,6 @@ sub checkfornew {
$self->verbose(1,$alert); # summary
if ($PAUSE::Config->{TESTHOST} || $self->{OPT}{testhost}) {
} else {
- our $Id;
my $email = Email::MIME->create(
header_str => [
To => $PAUSE::Config->{ADMIN},
@@ -476,7 +474,7 @@ sub checkfornew {
content_type => 'text/plain',
encoding => 'quoted-printable',
},
- body_str => join(qq{\n\n}, "Not indexed.\n\t$Id", $alert),
+ body_str => join(qq{\n\n}, "Not indexed.\n\n\t$Id", $alert),
);
sendmail($email);
@@ -497,7 +495,6 @@ sub empty_dir {
sub rewrite02 {
my $self = shift;
- our $Id;
#
# Rewriting 02packages.details.txt
#
@@ -997,7 +994,6 @@ maintainer
sub rewrite03 {
my($self) = shift;
- our $Id;
#
# Rewriting 03modlist.data
#
@@ -1101,7 +1097,6 @@ Date: %s
sub rewrite06 {
my($self) = shift;
- our $Id;
#
# Rewriting 06perms.txt
#
View
15 t/lib/PAUSE/TestPAUSE.pm
@@ -5,6 +5,7 @@ use MooseX::StrictConstructor;
use autodie;
use DBI;
+use DBIx::RunSQL;
use File::Copy::Recursive qw(dircopy);
use File::Path qw(make_path);
use File::pushd;
@@ -26,9 +27,17 @@ has author_root => (
sub deploy_schemas_at {
my ($self, $dir) = @_;
- # DESPERATELY EVIL -- rjbs, 2011-08-13
- `sqlite3 "$dir/authen.sqlite" < doc/schemas/authen_pause.schema.sqlite`;
- `sqlite3 "$dir/mod.sqlite" < doc/schemas/mod.schema.sqlite`;
+ my %schemas = (
+ authen => "doc/schemas/authen_pause.schema.sqlite",
+ mod => "doc/schemas/mod.schema.sqlite",
+ );
+
+ while ( my ($db,$sql) = each %schemas ) {
+ DBIx::RunSQL->create(
+ dsn => "dbi:SQLite:dbname=$dir/$db.sqlite",
+ sql => $sql,
+ );
+ }
}
sub test_reindex {

0 comments on commit b903f9a

Please sign in to comment.
Something went wrong with that request. Please try again.