package Report; use Tie::Hash; our @ISA = 'Tie::StdHash'; sub TIEHASH { my $storage = bless {}, shift; $storage } sub STORE { my ($this, $key, $value) = @_; my (@foo) = caller(); my ($package, $filename, $line) = caller; print STDERR "Storing $key => $value in $this at $package, in $filename on line $line.\n"; $this->{$key} = $value } package TheLoader; use strict; use warnings; tie %SIG, 'Report'; $SIG{__WARN__} = sub { return if $_[0] =~ /inherited AUTOLOAD/; print STDERR 'stolen warn: ' . $_[0]; }; package UNIVERSAL; sub AUTOLOAD { print "AUTOLOAD\n"; } 1;