Help for this page

Select Code to Download


  1. or download this
    $check_that_can_with = UNIVERSAL::can($obj,'can') ne \&UNIVERSAL::can;
    
  2. or download this
    my $can = \&UNIVERSAL::can;
    local $^W = 0;
    *UNIVERSAL::can = sub {
      $_[1] eq 'can' ? \&UNIVERSAL::can : &$can;
    };