Re: strange behaviour
- From: Jens Luedicke <jens irs-net com>
- To: Gtk+ Perl <gtk-perl-list gnome org>
- Subject: Re: strange behaviour
- Date: Tue, 16 Sep 2003 21:55:15 +0200
Chas Owens wrote:
Even that would not help if the module is in a different file. The our
construct only makes variable visible within a file. When accessing a global in
another package always use the $package::var form. Or better yet, don't use
globals. They are nasty hacks that are generally not a good idea in programs
large enough to be using packages. Alternatives to globals are closures, OO,
and storing data in the widgets themselves ($window->{somekey} = "foo").
I declare those variables with our and the specific callback function
is in the same file as other callbacks the can access the
hashref.
I tried now to access it with $main::hashref and that works. Odd...
--
Jens Luedicke <jens irs-net com>
Every nonzero finite dimensional inner product space has an orthonormal
basis. It makes sense, when you don't think about it.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]