Well, I still get the following set of warnings (maybe not
the same ones, but at least fewer of them) -- and two of the
lines you just quoted are among them:
Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l
+ine 989.
Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l
+ine 990.
Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l
+ine 1094.
Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l
+ine 1096.
Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l
+ine 1129.
where this is offending expression at lines 1094 and 1096:
@{$zbuffer}->[$x]->[$y]
I tried changing these two to be:
$$zbuffer[$x][$y]
the code still ran and still did the wrong things, same as
before. As for what you may be doing wrong in one or the
other spot of code, I couldn't guess, but consider doing
"perl -d yourscript" to run it with the debugger.
When you see the "DB<1>" prompt, type "b 251" -- that sets a
breakpoint at the start of this expression:
my $rec = {
edge => [$A, $B],
dx => abs($X1 - $X2),
dz => $Z1 - $Z2,
z => ( $X1 < $X2 ) ? ($Z1) : ($Z2)
};
then type "c" to run the script till it reaches that break
point. The GUI comes up, you can set parameters (I chose
to set "rotX" of "40" instead of "0"), and hit the "Draw"
button. Eventually the program will stop when it hits the
chosen line, and you get the "DB" prompt back; see "perldebug"
and "perldebtut" for fun things to try.
|