Perl's contracts are usually maintained by agreement rather than by enforcement. Of course, you could encapsulate it (as another poster has suggested).
Caution: Contents may have been coded under pressure.
Comment on Re: Representing Complex but Static Data in Perl