in reply to Backward compatible lexical warnings

I'd probably code it like this.
BEGIN { # Keep older versions of Perl from seeing warnings. $INC{"warnings.pm"} = "faked" if $] < 5.006; } ... use warnings;
That way there is no dependency and nobody will ever have to wonder what the actual scope of your non-standard warnings loading is.