develooper Front page | perl.qa | Postings from January 2008

is_deeply and qr// content on 5.11

Thread Next
From:
Ian Malpass
Date:
January 18, 2008 14:57
Subject:
is_deeply and qr// content on 5.11
Message ID:
47912EE3.1070900@indecorous.com
I got a failure message from CPAN testers for Pod::Extract::URI for 
5.11.0 patch 33001 on Linux 2.6.22-3-amd64 (x86_64-linux-thread-multi-ld)[0]

The failures were where I was testing to see if an arrayref of qr// 
patterns was the array I was expecting. is_deeply() has heretofore 
worked perfectly well.

The test line in question is:

    is_deeply( $peu->stop_uris, [ qr/foo/ ] );

And the failure is:

#   Failed test at t/new.t line 42.
#     Structures begin differing at:
#          $got->[0] = (?i-xsm:foo)
#     $expected->[0] = (?-xism:foo)
# Looks like you failed 1 test of 24.

So, is this 5.11 brokenness, is_deeply() brokenness, or are my tests 
naive (or wrong)?

Is there a better/preferred way to compare qr// patterns?

Thanks,

Ian

[0] 
<http://www.nntp.perl.org/group/perl.cpan.testers/2008/01/msg969390.html>

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About