Subject: | Need to enable respect_overload for Devel::StackTrace |
Hi,
Without the respect_overload option enabled for Devel::StackTrace, some overloading can get
confused after an error occurs. In particular, the symptom with Class::DBI classes is that
overloaded has_a relationships will no longer support stringify comparisons after a fatal error
caught by StackTrace.
For a comparison like $foobar->status eq 'A', the error will be similar to:
Operation `eq': no method found,
left argument in overloaded package Foo::Bar,
right argument has no overloaded magic
Patch against 0.02:
--- Catalyst-Plugin-StackTrace-0.020.dist/lib/Catalyst/Plugin/StackTrace.pm
2006-01-02 06:00:36.000000000 +1100
+++ Catalyst-Plugin-StackTrace-0.02/lib/Catalyst/Plugin/StackTrace.pm 2006-03-17
14:54:42.000000000 +1100
@@ -54,6 +54,7 @@
ignore_package => $ignore_package,
ignore_class => $ignore_class,
no_refs => 1,
+ respect_overload => 1,
);
$c->_stacktrace( [ $trace->frames ] );
};