The Perl 5 module Class::Field exports two subroutines, field and const. These functions are used to declare fields and constants in your class. Class::Field generates custom code for each accessor that is optimized for speed.