]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/nntp.t: attempt to track source of undefined vars
authorEric Wong <e@80x24.org>
Tue, 10 Oct 2023 09:03:09 +0000 (09:03 +0000)
committerEric Wong <e@80x24.org>
Tue, 10 Oct 2023 19:11:44 +0000 (19:11 +0000)
Occasionally, t/nntp.t spews undefined variable warnings under
`make check-run'.  While the test doesn't fail, it's annoying
to see them and it could be a source of deeper problems.

t/nntp.t

index 0d3384d7e59bd52c05643cb0531c819879a300f6..42a4ea97697970e4576c9bb36e236c855e7369fd 100644 (file)
--- a/t/nntp.t
+++ b/t/nntp.t
@@ -3,14 +3,17 @@
 use v5.12;
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
-require_mods(qw(DBD::SQLite Data::Dumper));
+require_mods(qw(DBD::SQLite));
 use_ok 'PublicInbox::NNTP';
 use PublicInbox::Config;
 use POSIX qw(strftime);
+use Data::Dumper;
 
 {
        my $quote_str = sub {
-               my (undef, $s) = split(/ = /, Data::Dumper::Dumper($_[0]), 2);
+               my ($orig) = @_;
+               my (undef, $s) = split(/ = /, Dumper($orig), 2);
+               $s // diag explain(['$s undefined, $orig = ', $orig]);
                $s =~ s/;\n//;
                $s;
        };