From 13c27bc38bca01718a33ffb328c4ab0a69b6f119 Mon Sep 17 00:00:00 2001 From: Scott Walters Date: Wed, 4 Aug 2010 11:01:39 -0400 Subject: [PATCH] Fix bad interaction with Test::Class: "Operation "eq": no method found, left argument in overloaded package WebGUI::Error..." --- lib/WebGUI/Exception.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/WebGUI/Exception.pm b/lib/WebGUI/Exception.pm index 0fb390cf6..09dae01b7 100644 --- a/lib/WebGUI/Exception.pm +++ b/lib/WebGUI/Exception.pm @@ -290,6 +290,12 @@ use Exception::Class ( package WebGUI::Error; use overload '~~' => sub { return $_[0]->isa($_[1]); + }, + 'eq' => sub { + return $_[0]->error eq $_[1]; + }, + 'ne' => sub { + return $_[0]->error ne $_[1]; }; }