home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / auto / Tk / Widget / pack.al < prev    next >
Encoding:
Text File  |  1997-08-10  |  497 b   |  23 lines

  1. # NOTE: Derived from blib\lib\Tk\Widget.pm.  Changes made here will be lost.
  2. package Tk::Widget;
  3.  
  4. sub pack
  5. {
  6.  local $SIG{'__DIE__'} = \&Carp::croak;
  7.  my $w = shift;
  8.  if (@_ && $_[0] =~ /^(?:configure|forget|info|propagate|slaves)$/x)
  9.   {
  10.    $w->Tk::pack(@_);
  11.   }
  12.  else
  13.   {
  14.    # Two things going on here:
  15.    # 1. Add configure on the front so that we can drop leading '-' 
  16.    $w->Tk::pack('configure',@_);
  17.    # 2. Return the widget rather than nothing
  18.    return $w;
  19.   }
  20. }
  21.  
  22. 1;
  23.