I posted this on Perlmonks as:
   http://perlmonks.org/index.pl?node_id=605598

But I think that the expertise to solve this problem resides on this PDL list 
instead.

----------------------

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: 
    * set a breakpoint at the final line ("my $dbg;") and run to the breakpoint 
    * place "%h" in "Enter Expr:" 
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 ... 

Jonathan


Jonathan Epstein                                [EMAIL PROTECTED]
Head, Unit on Biologic Computation              (301)402-4563
Office of the Scientific Director               Bldg 31, Room 2A47
Nat. Inst. of Child Health & Human Development  31 Center Drive
National Institutes of Health                   Bethesda, MD 20892  
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to