Help for this page

Select Code to Download


  1. or download this
    sub warns (&) {
        my $sub = shift;
    ...
            $sub->() }
        return wantarray ? @warns : scalar @warns;
    }
    
  2. or download this
    sub some_module_code {
        my $arg = shift;
    ...
    };
    is grep({/\bSome custom warning\b/i} @w), 1;
    is grep({/\bUse of uninitialized value\b/i} @w), 0;