Joe Schaefer wrote:
Cool; I'm wondering why not just use fallback => 1 and remove the '==' overload?
it doesn't seem to work. I did as you've suggested (to the current cvs):
'fallback' => 1,
instead of:
'==' => \&num_cmp;
and t/error/runtime.t now fails:
You have to remove "nomethod" also; all current tests pass for me with this patch:
Aha! It works :)
Two questions:
1) did you by chance look at how this magic is generated? Do we pay any penalty for letting overload handle that?
2) is it safe to rely on the magic for other ops we haven't thought of?
use overload
- nomethod => \&fatal,
+ fallback => 1,
+# nomethod => \&fatal,
'bool' => \&str,
- '==' => \&num_cmp,
- '!=' => \&num_cmp_not,
+# '==' => \&num_cmp,
+# '!=' => \&num_cmp_not,
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
