# NOTE: Derived from blib/lib/Tk.pm.
# Changes made here will be lost when autosplit is run again.
#line 542 "blib/lib/Tk.pm (autosplit into blib/lib/auto/Tk/FocusOK.al)"
catch { $value = $w->cget('-takefocus') };
if (!$@ && defined($value))
return 0 if ($value eq '0');
return $w->viewable if ($value eq '1');
return $value if (defined $value);
catch { $value = $w->cget('-state') } ;
if (!$@ && defined($value) && $value eq 'disabled')
$value = grep(/Key|Focus/,$w->Tk::bind(),$w->Tk::bind(ref($w)));