bduggan has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

In perl 5.8.8 on linux, I get...
perl -MList::MoreUtils=zip -e '(bless {})->zip' Segmentation fault (core dumped)
Just wondering if this is a known issue (it bit me when I accidentally imported zip() and already had a method of the same name).

thanks
Brian

Replies are listed 'Best First'.
Re: List::MoreUtils seg fault
by GrandFather (Saint) on Jan 16, 2008 at 23:31 UTC

    Fails under Windows also.


    Perl is environmentally friendly - it saves trees

      Disable the XS part of List::MoreUtils so that the Perl version of zip() is called and it won't segfault (if you can put up with how slowly it doesn't). ;)

      zip has a "prototype" of (\@\@;\@\@...) and method invocation thwarts checking of prototypes and XS code is rarely robust and tends to just segfault when, for example, it is expecting at least two references to arrays but instead gets a reference to a hash.

      - tye