Re: Perl Tk:Scheduler command called subroutine fails to talk to tk widgets



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.

.



Relevant Pages

  • Regarding copy constructors and mutators
    ... One thing that confused me about Perl (no matter how often I read ... "perldoc overload" page and in the Camel book explain that overloading ... as a reference to an object or as an actual copy of an object. ... time for another clarification: ...
    (comp.lang.perl.misc)
  • Re: associate + attach?
    ... typeglobs seem rather odd from my perspective, ... reference, too. ... However Perl "file handles" are a special case. ... "typeglob" entity that contains the filehandle. ...
    (comp.lang.perl.misc)
  • Re: taking references to functions
    ... > I'm building a diagnostic medical questionnaire using Perl Tk. ... > to create a reference to a named function but not for unnamed ones. ... Notice that %dispatch here is an actual hash variable. ...
    (perl.beginners)
  • Re: Complex Objects in Perl
    ... > Objects in Perl are implemented as a reference to an ... > anonymous hash. ... > array or a hash or it may be another object (reference to ... > installation of perl: ...
    (comp.lang.perl)
  • Re: Learning Objects, destroy methods
    ... > Perl scoping works. ... > the scalar holding the hashref. ... The reference to the object's data is passed to the ... So I don't see your point about calling DESTROY from 'delete' as you can't do ...
    (perl.beginners)