unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] t/nntp.t: attempt to track source of undefined vars
@ 2023-10-10  9:03 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-10-10  9:03 UTC (permalink / raw)
  To: meta

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 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/t/nntp.t b/t/nntp.t
index 0d3384d7..42a4ea97 100644
--- 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;
 	};

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-10  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10  9:03 [PATCH] t/nntp.t: attempt to track source of undefined vars Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).