http://www.perlmonks.org?node_id=189544


in reply to Triggering 'strict' from within a package

After reading Abigail-II's answer and tye's answer, I looked in perlvar for $^H and found something almost identical to tye's answer:
BEGIN { require strict; strict->import('vars') if $condition } # which to import all restrictions would be BEGIN { require strict; strict->import if $condition }