-
+# -*- buffer-read-only: t -*-
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file was created by warnings.pl
# Any changes made here will be lost.
package warnings;
-our $VERSION = '1.04';
+our $VERSION = '1.06';
+
+# Verify that we're called correctly so that warnings will work.
+# see also strict.pm.
+unless ( __FILE__ =~ /(^|[\/\\])\Q@{[__PACKAGE__]}\E\.pm$/ ) {
+ my (undef, $f, $l) = caller;
+ die("Incorrect use of pragma '@{[__PACKAGE__,]}' at $f line $l.\n");
+}
=head1 NAME
sub Croaker
{
- require Carp;
+ require Carp::Heavy; # this initializes %CarpInternal
+ local $Carp::CarpInternal{'warnings'};
delete $Carp::CarpInternal{'warnings'};
Carp::croak(@_);
}
}
1;
+# ex: set ro: