user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 4/4] t/v2reindex.t: 5.10.1 glob compatibility
  2020-01-26 10:29  6% [PATCH 0/4] Perl 5.10.1 compatibility fixes Eric Wong
@ 2020-01-26 10:29  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-01-26 10:29 UTC (permalink / raw)
  To: meta

I'm not sure when `for (<"quoted string/glob/*">)' became
supported, and maybe it was inadvertant, but it fails
with Perl 5.10.1.  Just use the glob() function to be
explicit.
---
 t/v2reindex.t | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/v2reindex.t b/t/v2reindex.t
index 2c6bdd57..990513a3 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -157,7 +157,7 @@ ok(!-d $xap, 'Xapian directories removed again');
 	is($ibx->mm->num_highwater, 10, 'num_highwater as expected');
 	my $mset = $ibx->search->query($phrase, {mset=>1});
 	isnt($mset->size, 0, "phrase search succeeds on indexlevel=full");
-	for (<"$xap/*/*">) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
+	for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
 
 	my ($min, $max) = $ibx->mm->minmax;
 	is_deeply($ibx->mm->msg_range(\$min, $max), $msgmap, 'msgmap unchanged');
@@ -193,7 +193,7 @@ ok(!-d $xap, 'Xapian directories removed again');
 	$words =~ tr/"'//d;
 	my $mset = $ibx->search->query($words, {mset=>1});
 	isnt($mset->size, 0, "normal search works on indexlevel=medium");
-	for (<"$xap/*/*">) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
+	for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
 
 	ok($sizes{full} > $sizes{medium}, 'medium is smaller than full');
 
@@ -223,7 +223,7 @@ ok(!-d $xap, 'Xapian directories removed again');
 
 	isnt($ibx->search, 'no search for basic');
 
-	for (<"$xap/*/*">) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
+	for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
 	ok($sizes{medium} > $sizes{basic}, 'basic is smaller than medium');
 
 	my ($min, $max) = $ibx->mm->minmax;

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] Perl 5.10.1 compatibility fixes
@ 2020-01-26 10:29  6% Eric Wong
  2020-01-26 10:29  7% ` [PATCH 4/4] t/v2reindex.t: 5.10.1 glob compatibility Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-01-26 10:29 UTC (permalink / raw)
  To: meta

Aside from the highlight.pm-dependent stuff, everything seems
to work fine after these patches under Perl 5.10.1.

Getting 5.10.1 to run required Devel::PatchPerl to make it
build on modern systems and LOTS of waiting for CPAN modules
to download and build, though :<

Eric Wong (4):
  daemon: provide TCP_DEFER_ACCEPT for Perl <5.14
  avoid relying on IO::Handle/IO::File autoload
  t/hl_mod: document IO::Handle for autoflush
  t/v2reindex.t: 5.10.1 glob compatibility

 lib/PublicInbox/Daemon.pm |  5 +++--
 lib/PublicInbox/Qspawn.pm |  2 +-
 t/hl_mod.t                |  1 +
 t/httpd-corner.t          | 11 ++++++-----
 t/httpd-https.t           |  2 +-
 t/httpd.t                 |  2 +-
 t/import.t                |  7 +++----
 t/nntpd-tls.t             |  2 +-
 t/v2reindex.t             |  6 +++---
 9 files changed, 20 insertions(+), 18 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-01-26 10:29  6% [PATCH 0/4] Perl 5.10.1 compatibility fixes Eric Wong
2020-01-26 10:29  7% ` [PATCH 4/4] t/v2reindex.t: 5.10.1 glob compatibility Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).