When you write a modules, sometimes you'd like to allow your users two ways of operations. A simple one for which you provide a single function and a complex one where they need to instantiate an object of your class and call methods.

Sometimes you'd like to use the same function name for both case.

I found an examples in version 1.000031 of Text::Markdown

Let's see how does it work: