home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 December / PCpro_2006_12.ISO / ossdvd / server / Perl2 / site / lib / auto / Tk / Widget / ASkludge.al next >
Encoding:
Text File  |  2002-12-01  |  682 b   |  31 lines

  1. # NOTE: Derived from blib\lib\Tk/Widget.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk::Widget;
  5.  
  6. #line 1224 "blib\lib\Tk/Widget.pm (autosplit into blib\lib\auto\Tk\Widget\ASkludge.al)"
  7. sub ASkludge
  8. {
  9.  my ($hash,$sense) = @_;
  10.  foreach my $key (%$hash)
  11.   {
  12.    if ($key =~ /-.*variable/ && ref($hash->{$key}) eq 'SCALAR')
  13.     {
  14.      if ($sense)
  15.       {
  16.        my $val = ${$hash->{$key}};
  17.        require Tie::Scalar;
  18.        tie ${$hash->{$key}},'Tie::StdScalar';
  19.        ${$hash->{$key}} = $val;
  20.       }
  21.      else
  22.       {
  23.        untie ${$hash->{$key}};
  24.       }
  25.     }
  26.   }
  27. }
  28.  
  29. # end of Tk::Widget::ASkludge
  30. 1;
  31.