Re: [HACKERS] First CommitFest: July 15th

by Joshua Tolleyon 2009-07-08T05:12:37+00:00

--Clx92ZfkiYIKRjnr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Jul 02, 2009 at 03:42:56PM +0100, Dave Page wrote:
> On Thu, Jul 2, 2009 at 3:22 PM, Joshua Tolley wrote:
> > On Thu, Jul 02, 2009 at 08:41:27AM +0100, Dave Page wrote:
> >> As far as I'm aware, there's been no code
> >> review yet either, which would probably be a good idea.
> >
> > I don't have loads of time in the coming days, but IIRC I've taken a gl=
ance at
> > a past version of the code, and would be willing to do so again, if it =
would
> > be useful.
>=20
> If you can look over it, that would be great. i'm not really qualified
> to review perl code, and we always prefer to have at least two sets of
> eyeballs on anything that we put into production for obvious reasons.
On the assumption that other folks' testing has included bug hunting and the
like, I've spent the review time I was able to muster up figuring out the c=
ode
and looking for stuff that scared me. I didn't find anything that jumped ou=
t.
I did wonder if the %ACTION hash in Handler.pm ought not perhaps include a
flag to indicate that that action needs authentication, and have the handler
take care of that instead of the individual actions. Perhaps a similar
technique could be profitably employed for the titles. Oh, and in Patch.pm,
s/with/which in "patches with have been Committed".
Finally, I ran Perl::Critic, and attached an (admittedly untested) patch to
clean up the things it whined about.
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
--Clx92ZfkiYIKRjnr
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="perlcritic.patch"
Content-Transfer-Encoding: quoted-printable
diff --git a/perl-lib/PgCommitFest/CommitFestTopic.pm b/perl-lib/PgCommitFe=
st/CommitFestTopic.pm
index 3e101fc..92113ac 100644
--- a/perl-lib/PgCommitFest/CommitFestTopic.pm
+++ b/perl-lib/PgCommitFest/CommitFestTopic.pm
@@ -80,7 +80,8 @@ EOM
sub search {
my ($r) =3D @_;
my $id =3D $r->cgi_id();
- my $d =3D $r->db->select_one(select_one({'dbh'}->rollback() if $self->{'dirty'};
- return undef;
+ return;
}
=20
sub update {
diff --git a/perl-lib/PgCommitFest/Handler.pm b/perl-lib/PgCommitFest/Handl=
er.pm
index d94e042..19c4424 100644
--- a/perl-lib/PgCommitFest/Handler.pm
+++ b/perl-lib/PgCommitFest/Handler.pm
@@ -103,9 +103,9 @@ EOM
$pg_login_db->disconnect;
if (defined $u) {
my $random_bits;
- open(RANDOM_BITS, '

Conversations: [HACKERS] First CommitFest: July 15th

Related Lists