Hi folks,
I'm trying to move my debug and validate modules to a seperate package.
However, I'm having trouble. I've created a new empty module/package direct
from the perldocs and then put my debug routine in. So far, so good.
I then created my program to use it, but I'm having trouble accessing the
%_DEBUG hash in main::. The idea is that when I want to use debug, I create
my hash, use the module, and it accesses my hash. As you can see, it's not
working. I'm assuming that the problems with the syntax I'm using to access
%{$package}::_DEBUG.
You could add a:
our %DEBUG;
to Trainset::Utils and set it elsewhere with:
$Trainset::Utils::DEBUG{whatever} = 'whatever';
You could also replace our with my and add a set_debugging() sub, that manipulates the hash.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>