use feature "try"; use constant CHECK_HINTHASH => 0; sub check_hinthash {warn "feature_try = ".$^H{feature_try} if CHECK_HINTHASH} #... BEGIN { check_hinthash() } # feature enabled { no feature qw( try ); BEGIN { check_hinthash() } # feature disabled use Try::Tiny qw( try catch ); try { ... }; } BEGIN { check_hinthash() } # feature enabled # try { ... }; <-- would fail