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

Greetings ... please consider the following mini-script, which concerns the placement of a PDL value inside a vanilla Perl hash:
use strict; use PDL; use PDL::NiceSlice; my %h; my $PDL_value = zeroes(3,1); $h{'keyval'} = $PDL_value; my $dbg;
========================
Now, if we run this as "perl -d:ptkdb sample.pl" and: The debugger will crash, yielding the error message: Hash given as a pdl - but not {PDL} key! at c:/Perl/site/lib/Devel/ptkdb.pm line 2619.

It turns out that the message "Hash given as a pdl - but not {PDL} key!" (not surprisingly) comes from within PDL itself, not ptkdb. Is there an effective workaround for this problem which makes it possible to debug code with hashes which contain PDL objects?

TIA ...

Replies are listed 'Best First'.
Re: pdl+ptkdb=debugger crash
by andye (Curate) on Mar 20, 2007 at 12:56 UTC
Re: pdl+ptkdb=debugger crash
by jesuashok (Curate) on Mar 20, 2007 at 02:29 UTC
    Have you look into this. It Could help. Please ignore it if not.


    hmmm ....let me think what did I said
Re: pdl+ptkdb=debugger crash
by dk (Chaplain) on Mar 23, 2007 at 08:28 UTC
    If you run your code outside the debugger with one of: print $h{'keyval'} and/or print values %h, will it also crash? If yes, the problem is definitely somewhere in PDL.