How do I translate a typical Perl 5 class into Perl 6?
The Perl 5 support for object orientation makes it hard to define a “typical class” in Perl 5. However, here is an example of a Ball class, which stores details about a ball, including how bouncy it is. There is a method to calculate the velocity a ball will bounce back at if it hits a surface at a given velocity.