Subject: | Fails with Test::More > 0.94 |
As per subject.
I just verified with some of my smokers: upgrading from Test::More 0.94
to 0.95_01 or higher breaks your test suite. It is the overloading test.
The following change makes the test pass again (BUT this is not the fix!):
--- t/02-account.t~ 2010-10-10 06:37:56.000000000 +0200
+++ t/02-account.t 2010-10-10 06:36:22.000000000 +0200
@@ -12,7 +12,7 @@
my $account = $ohloh->fetch_account(12933);
-is $account => 'Yanick', 'overloading';
+is "$account" => 'Yanick', 'overloading';
like $account->as_xml => qr# ^ \s* <account> .* </account> \s* $ #sx,
'as_xml()';
This indicates that the overloading in the package has no fallback to
stringification when somebody tests for equality with 'eq'.
So this is the real fix:
--- lib/WWW/Ohloh/API/Account.pm~ 2010-10-10 06:42:30.000000000 +0200
+++ lib/WWW/Ohloh/API/Account.pm 2010-10-10 06:44:34.000000000 +0200
@@ -18,7 +18,7 @@
our $VERSION = '1.0_1';
-use overload '""' => sub { $_[0]->name };
+use overload '""' => sub { $_[0]->name }, fallback => 1;
#<<<
my @id_of : Field
HTH, Best wishes,