diff options
author | Eric Wong <e@80x24.org> | 2015-09-21 11:11:07 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-21 11:37:01 +0000 |
commit | f4ae902794c20dd19bad9446855743ad8d42edf2 (patch) | |
tree | 1c856862f9bb5cc01641e6097698e339ed62a1ac | |
parent | cb2d1876d776ae6b8ec1d172f1f64169fe1efd5c (diff) | |
download | public-inbox-f4ae902794c20dd19bad9446855743ad8d42edf2.tar.gz |
This doesn't actually change anything as the constant is still usable in other subroutines, but helps with consistency and readability IMHO.
-rw-r--r-- | lib/PublicInbox/Msgmap.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index 2f64d90c..f2857908 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -84,10 +84,10 @@ sub mid_insert { $dbh->last_insert_id(undef, undef, 'msgmap', 'num'); } -use constant MID_FOR => 'SELECT mid FROM msgmap WHERE num = ? LIMIT 1'; sub mid_for { my ($self, $num) = @_; my $dbh = $self->{dbh}; + use constant MID_FOR => 'SELECT mid FROM msgmap WHERE num = ? LIMIT 1'; my $sth = $self->{mid_for} ||= $dbh->prepare(MID_FOR); $sth->bind_param(1, $num); $sth->execute; |