Subject: | Re: PDL-2.4.3: Not a HASH reference at /usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Graphics/TriD/Objects.pm line 53, <> line 29. |
Date: | Sun, 17 Feb 2008 18:04:14 -0800 |
To: | bug-PDL [...] rt.cpan.org |
From: | MC <rossiya [...] gmail.com> |
Hello
This bug evaporated when I reverted Perl back to 5.8.8, which is the
current standard on FreeBSD. I don't think this has anything to do
with PDL, as most perl modules ended up broken after the reversion. I
don't know where to delete this bug report. However I now think it is
a fluke related to the sea of code upon which PDL floats.
On Dec 21, 2007 11:57 AM, MC <rossiya@gmail.com> wrote:
Show quoted text
> Hello
>
> On Friday, 21Dec2007 I found this but in the PDL demo after upgrading
> from perl 5.8.8 to perl 5.10.0:
>
> pocket:/trash/perl/usr/local/bin $ perldl
> perldl> demo 3d
>
> ---- Code:
> # Number of subdivisions for lines / surfaces.
> $size = 25;
>
> $cz = (xvals zeroes $size+1) / $size; # interval 0..1
> $cx = sin($cz*12.6); # Corkscrew
> $cy = cos($cz*12.6);
> line3d [$cx,$cy,$cz]; # Draw a line
> # [press 'q' in the graphics window when done]
> ---- Output:
> ----
> ----
> OOPS!!! Something went wrong, please make a bug report!: Not a HASH
> reference at /usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Graphics/TriD/Objects.pm
> line 53, <> line 29.
> at /usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Graphics/TriD/Objects.pm
> line 53
> PDL::Graphics::TriD::GObject::new('PDL::Graphics::TriD::LineStrip',
> 'ARRAY(0x8c6f654)') called at
> /usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Graphics/TriD.pm line
> 685
> PDL::line3d('ARRAY(0x8c6f654)') called at (eval 568) line 8
> eval 'package PDL::Demos::TriD1; use PDL;
> # Number of subdivisions for lines / surfaces.
> $size = 25;
>
> $cz = (xvals zeroes $size+1) / $size; # interval 0..1
> $cx = sin($cz*12.6); # Corkscrew
> $cy = cos($cz*12.6);
> line3d [$cx,$cy,$cz]; # Draw a line
> # [press \'q\' in the graphics window when done]
>
> ;' called at /usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Demos/Screen.pm
> line 55
> PDL::Demos::Routines::actnw('\x{a}\x{9}# Number of
> subdivisions for lines / surfaces.\x{a}\x{9}$size = 25;...') called at
> /usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Demos/TriD1.pm line 37
> PDL::Demos::TriD1::run() called at /usr/local/bin/perldl line 388
> main::demo('3d') called at (eval 566) line 4
> main::__ANON__() called at /usr/local/bin/perldl line 644
> eval {...} called at /usr/local/bin/perldl line 644
> main::eval_and_report('demo \'3d\'') called at
> /usr/local/bin/perldl line 583
> main::process_input() called at /usr/local/bin/perldl line 603
> eval {...} called at /usr/local/bin/perldl line 603
>
> ------------------------------------------------------------------------------------------------------------
>
> In perl debugger I got:
>
> PDL::Graphics::TriD::GObject::new(/usr/local/lib/perl5/site_perl/5.10.0/mach/PDL/Graphics/TriD/Objects.pm:53):
> 53: $this->{Options} = $options;
> DB<<18>> x $this->{Options}
> Not a HASH reference at (eval
> 342)[/usr/local/lib/perl5/5.10.0/perl5db.pl:638] line 2, <DATA> line
> 387.
> DB<<19>> x $this
> 0 PDL::Graphics::TriD::LineStrip=ARRAY(0x910fb90)
> 0 HASH(0x8f8af14)
> 'ChangedSub' => 3
> 'Colors' => 7
> 'List' => 4
> 'Objects' => 1
> 'Options' => 8
> 'Points' => 6
> 'VRML' => 5
> 'ValidList' => 2
> DB<<20>> x $this->[0]->{Options}
> 0 8
> DB<<21>>
>
> It would seem that perl 5.10 insists that $this points to an ARRAY,
> whilst in perl5.8.8 $this is a HASH REF
>
> $ uname -a
> FreeBSD pocket 6.2-RELEASE-p6 FreeBSD 6.2-RELEASE-p6 #1: Tue Jul 17
> 00:15:41 PDT 2007 root@pocket:/usr/obj/usr/src/sys/MC2 i386
>
> I check the CPAN bug report system and seldom read this email address,
> as I get thousands of emails here weekly.
>