In this example we are going to use a regular Perl class as a type constraint. In the Moose version of the series we used a DateTime object as a type constraint. Classes as constraints in Moose

Implementing it in core Perl is quite similar to the previous cases. For example when we had accessor with type constraint.