Perl PadWalker does not display variables declared with "our"
Having some problems with Perl debugger in Eclipse and PadWalker. Only
used it for simple one-file scripts before. Variables declared using "my".
They appear fine in the debugger "variables" window.
Now I am using someone else's more complicated script and I don't see the
variables declared using "our". To investigate, I boiled it down to one
very simple example
junk.pl:
use strict;
use warnings;
require 'junk2.pl';
package Junk;
my $simon = "SOMETHING";
print "JUNK " . $Junk2::james . "\n";
print "JUNK " . $simon . "\n";
junk2.pl:
package Junk2;
our $james;
$james = "FOO";
1;
Stepping through the code, the vairable my $simon displays in the debugger
window fine but variable our $james does not. The debugger is working OK:
the program runs and the output window shows the correct output... it's
just the variables window that fails to show $james.
The screen shot below demonstrates the problem. As you can see the
variable $james from the Junk2 package prints ok, but does not appear in
the variables display.
Been searching a while for a solution but can't find anything that matches
well... any ideas?
No comments:
Post a Comment