Re: Perl Tk:Scheduler command called subroutine fails to talk to tk widgets
- From: "Andy" <anedza@xxxxxxxxxxxxxxxxxxxxxx>
- Date: 1 Feb 2007 08:05:57 -0800
I wish I could get it working...
The problem seems to have something to do with Perl references
(covered by the Perlref doc that comes with ActiveState). The
documentation says that in terms of capabilities, all memory within a
Perl program is referencable by anything (both perl modules and
calling programs have equal and full access to each other) - you just
have to ask for it.
Unlike other languages, Perl seems to have hundreds of ways to
reference memory for variables, arrays, and code. The differences
revolve around scope and encapsulation of whatever is being
referenced.
What is unusual about Perl is that you have a choice of whether or not
to make your reference use a symbolic table. Its when a "local"
symbolic table is used for a reference that accessibility problems
occur.
Perl borrows a concept of "closure" from the language LISP that seems
to allow you to dynamically define what "scope" really means for any
particular reference. I found the documentation very confusing.
"Closure" seems to be stipulated by a combination of reference
operators (such as \&, @, $), the context that they appear in (such as
inside eval(), do{}, or sub{}), and Perl directives (such as EXPORT).
And, several of these constructs even have a few variations (such as
@EXPORT_OK and @EXPORT).
I have found it isn't just TK widgets that I can't reference. Any
subroutines that I call from inside of the run() subroutine that are
part of the same program run() resides in can't be called either -
they also hang.
Any help in understanding this would be much appreciated.
.
- Follow-Ups:
- References:
- Prev by Date: Re: Perl Tk:Scheduler command called subroutine fails to talk to tk widgets
- Next by Date: Re: Perl Tk:Scheduler command called subroutine fails to talk to tk widgets
- Previous by thread: Re: Perl Tk:Scheduler command called subroutine fails to talk to tk widgets
- Next by thread: Re: Perl Tk:Scheduler command called subroutine fails to talk to tk widgets
- Index(es):
Relevant Pages
|
|