package Cloneable; # interface sub clone { die "you must implement clone() yourself" } 1; #### sub import { my $callerpackage = caller; return 1 if($locks{$callerpackage}); $locks{$callerpackage} = 1; # they need to finish loading before we can inspect what methods they've defined eval "use $callerpackage;"; # [do the Interface validation and die if it fails...] undef $locks{$callerpackage}; }