[Israel.pm] List of all contexts in Perl

Levenglick Dov-RM07994 RM07994 at freescale.com
Sun May 30 21:24:56 PDT 2010

It crashes just as nicely on ActiveState perl on Windows (This is perl, v5.8.8 built for MSWin32-x86-multi-thread).
For those of you who know how to decipher Windows crash reports, I attached it. I am baffled. 

Best Regards,
Dov Levenglick
SmartDSP OS Development Leader
-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf Of Gabor Szabo
Sent: Sunday, May 30, 2010 22:37
To: Perl in Israel
Subject: Re: [Israel.pm] List of all contexts in Perl

On Sun, May 30, 2010 at 7:18 PM, Yuval Kogman <nothingmuch at woobling.org> wrote:
> In the context of Want it just checks if the retop operation involves a
> boolean operator such that SvTRUE of the return value is the only thing ever
> used.
>     my $foo = foo();
>     if ( $foo ) { # not boolean context
>     if ( foo() ) { # boolean context

So I wanted to show how
if ( $foo ) {
is a boolean context and started to write an example:

use strict;
use warnings;

tie my $z, 'X', 1;
print $z;

package X;
use strict;
use warnings;
use Want;

	my ($class, $self) = @_;
	return bless \$self, $class,

sub FETCH {
	my ($self) = @_;
	print "ok" if want('BOOL');
	return $$self;

the response was surprising:

Segmentation fault

using  v5.10.1 that comes with Ubuntu 10.4 and Want 0.18

the call to 'want' generates this.

Can someone with a newer version of perl confirm this?

Perl mailing list
Perl at perl.org.il

More information about the Perl mailing list