lib/PublicInbox/Msgmap.pm | 2 +- diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index 2f64d90c71f741cb100c3beacd124e2698260d71..f28579088e1ac78682915007873b0c8ef4766544 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -84,10 +84,10 @@ $sth->execute; $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;