...Class::Contract is specifically tied to the concept of classes...
This is also mentioned in the Class::Contract POD under "Offering better facilities for retrofitting contracts".
Yep. This a cross-cutting concern that should not be tangled with a class definition framework. Such concerns are best untangled using the Aspect module. Of course it may be difficult to provide all the DBC features Class::Contract provides, like old() and inheritance support.
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).