Subject: | Make warnings non-fatal, and die at end of scope |
Something like:
my $has_warnings;
$SIG{__WARN__} = sub {
$has_warnings++;
$orig->(@_);
};
on_scope_end {
die("There were compile-time warnings") if $has_warnings;
};
Requested by ilmari.