Psuedo Code: use Cool::PrePostModule; ### # some precondition documented here # some postcondition documented here ### sub functionname { # get all yer args here &setPrecondtion('something == somethingelse'); &setPostcondition('thisthing == thatthing'); &checkPrecondition('somethingelse') or die 'I cant verify precondition'; #yadayadayada &checkPostcondition('thatthing') or die 'I cant verify postcondition'; }