summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/lib/Tie/Hash.pm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/lib/Tie/Hash.pm')
-rw-r--r--contrib/perl5/lib/Tie/Hash.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/perl5/lib/Tie/Hash.pm b/contrib/perl5/lib/Tie/Hash.pm
index 2902efb..c6ec3d4 100644
--- a/contrib/perl5/lib/Tie/Hash.pm
+++ b/contrib/perl5/lib/Tie/Hash.pm
@@ -73,6 +73,8 @@ Return the next key for the hash.
Verify that I<key> exists with the tied hash I<this>.
+The B<Tie::Hash> implementation is a stub that simply croaks.
+
=item DELETE this, key
Delete the key I<key> from the tied hash I<this>.
@@ -100,6 +102,7 @@ good working examples.
=cut
use Carp;
+use warnings::register;
sub new {
my $pkg = shift;
@@ -111,8 +114,8 @@ sub new {
sub TIEHASH {
my $pkg = shift;
if (defined &{"${pkg}::new"}) {
- carp "WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing"
- if $^W;
+ warnings::warn "WARNING: calling ${pkg}->new since ${pkg}->TIEHASH is missing"
+ if warnings::enabled();
$pkg->new(@_);
}
else {
OpenPOWER on IntegriCloud