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.
Perl Maven Pro - screencasts with articles
As a Perl Maven Pro subscriber you will enjoy a growing library of articles and screencasts.
Two screencasts a week and all the previous screencasts!
Ad free browsing!
The articles contain topics such as Web Application Development, Object Oriented programming, testing, deployment, code walkthroughs, best practices, and many more subjects in Perl, and in related technologies.
Subscriptions include all previous pro episodes.
If you already have Perl Maven Pro subscription, you will need to login to access the articles.