From: Eric Wong Date: Fri, 13 Dec 2024 18:36:31 +0000 (+0000) Subject: t/filter_base: relax Regexp class match with ->isa X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83b14eaf2ff26ea9138c77b365992f3c5c4a4adc;p=thirdparty%2Fpublic-inbox.git t/filter_base: relax Regexp class match with ->isa It would be nice to support alternative Regexp engines such as re::engine::PCRE2 in the future. The exact ref() name can't match, however ->isa() works with re::engine::PCRE2. So future-proof our code for potential changes in case PCRE2 becomes usable. --- diff --git a/t/filter_base.t b/t/filter_base.t index 2646321a8..3a0dbf8b8 100644 --- a/t/filter_base.t +++ b/t/filter_base.t @@ -10,7 +10,7 @@ use_ok 'PublicInbox::Filter::Base'; my $f = PublicInbox::Filter::Base->new; ok($f, 'created stock object'); ok(defined $f->{reject_suffix}, 'rejected suffix redefined'); - is(ref($f->{reject_suffix}), 'Regexp', 'reject_suffix should be a RE'); + ok $f->{reject_suffix}->isa('Regexp'), 'reject_suffix should be a RE'; } {