is( $^W, 1, 'warnings are on' ); third_party_code(); is( $^W, 1, 'warnings are still on' ); #### { local $^W; third_party_code(); ok (!$^W, 'warnings still off'); }