A.pm ----------- package A use B; B->foo(); B.pm ----------- package B sub foo{ die 'your data is screwed'; }