]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: fix non-sensical interpolation in BUG message
authorEric Wong <e@yhbt.net>
Mon, 1 Jun 2020 10:06:47 +0000 (10:06 +0000)
committerEric Wong <e@yhbt.net>
Wed, 3 Jun 2020 04:04:21 +0000 (04:04 +0000)
No point in attempting to print the value of an undefined
variable if there's a bug.  Fortunately, (AFAIK) we've never hit
that bug check :>

lib/PublicInbox/V2Writable.pm

index b393b31f0e205f3191169762fbd1af9d76fa3d52..1a824531f3cb2df71a8bdd015f891ac6dd6edcfd 100644 (file)
@@ -182,7 +182,7 @@ sub _add {
 
        my ($num, $mid0) = v2_num_for($self, $mime);
        defined $num or return; # duplicate
-       defined $mid0 or die "BUG: $mid0 undefined\n";
+       defined $mid0 or die "BUG: \$mid0 undefined\n";
        my $im = $self->importer;
        my $smsg = bless { mid => $mid0, num => $num }, 'PublicInbox::Smsg';
        my $cmt = $im->add($mime, undef, $smsg); # sets $smsg->{ds|ts|blob}