Subject: | Segfault when using C::R in overloaded operator '>' (5.10.1) |
I'm trying to use Contextual::Return in an overloaded operator (using
the 'overload' module).
The attached file gives a segmentation fault.
Contextual::Return 0.003001
Want 0.18
Perl 5.10.1 x86_64-linux-gnu-thread-multi
Ubuntu 11.04
--
Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/
Subject: | want.pl |
use strict;
use warnings;
{
package X;
use Contextual::Return;
use overload '>' => \>
sub gt
{
return
NUM { "NUM" }
STR { "STR" }
BOOL { "BOOL" }
REF { "REF" }
VOID { "VOID" }
DEFAULT { "DEFAULT" }
}
}
my $o = bless \my $x, 'X';
#print +($o > 4), "\n";
print +( $o > *STDOUT );