http://www.perlmonks.org?node_id=1027764


in reply to Re: Tk::waitVariableX - AUTOLOAD failed
in thread Tk::waitVariableX - AUTOLOAD failed

Thanks very much. It solved the problem (dont know why).
Thanks again - jowe
  • Comment on Re^2: Tk::waitVariableX - AUTOLOAD failed

Replies are listed 'Best First'.
Re^3: Tk::waitVariableX - AUTOLOAD failed
by hdb (Monsignor) on Apr 09, 2013 at 15:40 UTC

    The documentation and the code of the module are looking inconsistent. The documentation says:

    $splash->waitVariableX( [$millis, $destroy_splashscreen], \$v1, \$v2} +);

    while in the code

    sub waitVariableX { use Tie::Watch; my ($parent, $millis) = (shift, shift); # @_ has list of var refs

    the arguments have different names (and probably different meaning as well).

      It is the OO Perl. The first argument is the invocant, the second argument is the interval (but according to the documentation, might as well be an array ref). The rest of the parameters are left in @_ to be used later.

      Handling the array ref:

      if (ref $millis eq 'ARRAY') { $callback = Tk::Callback->new($millis->[1]); $millis = $millis->[0]; }

      Handling the remaining variable references:

      foreach my $vref (@_) {
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      The module description stems from the 'Mastering Perl/Tk' bible. Both usage formats are described as valid. I choose the more 'simple' one.