Skip Menu |
 

This queue is for tickets about the List-MoreUtils CPAN distribution.

Report information
The Basics
Id: 19512
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.19
Fixed in: (no value)



Subject: XS pairwise doesn't propagate $@
Download (untitled) / with headers
text/plain 493b
The XS version of pairwise() doesn't propagate $@ if a die occurs in the passed BLOCK. Here's test code: ---------------------------------- #!/usr/bin/perl use strict; use warnings; use List::MoreUtils qw( pairwise ); eval { my @a = ( 1 ); my @b = ( 1 ); pairwise { die("help me!") } @a, @b; }; warn "died: $@" if $@; ------------------------------------ And the results: % env LIST_MOREUTILS_PP=0 perl test % env LIST_MOREUTILS_PP=1 perl test died: help me! at test line 11. %
From: tassilo.von.parseval [...] rwth-aachen.de
Download (untitled) / with headers
text/plain 932b
Hi there, sorry for being late in responding. For some reason, this report was never forwared to my mail. On Fri May 26 13:53:25 2006, DJERIUS wrote: Show quoted text
> The XS version of pairwise() doesn't propagate $@ if a die occurs in
the Show quoted text
> passed BLOCK. Here's test code: > > ---------------------------------- > #!/usr/bin/perl > > use strict; > use warnings; > > use List::MoreUtils qw( pairwise ); > > eval { > my @a = ( 1 ); > my @b = ( 1 ); > pairwise { die("help me!") } @a, @b; > }; > > warn "died: $@" if $@; > ------------------------------------ > > And the results: > > % env LIST_MOREUTILS_PP=0 perl test > % env LIST_MOREUTILS_PP=1 perl test > died: help me! at test line 11. > %
Indeed, pairwise() uses G_EVAL and doesn't check if the called code died. In fact, right now it does not only not propagate $@, but the die () is effectively tracked. I'll release a fixed version later this week. Cheers, Tassilo


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.