Reusablilty is a double-edged sword. It can help to save time but create more mess. In this example, we are going to reuse Rule for different plots.
An important note. type is a reserved keyword in Perl. We can’t use type as a parameter in Perl objects. Therefore, we use t in place of type. Don’t worry, when it compiles, t will be converted to type.
I hope by now you can understand how this API works just by reading the code. =)