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:
Perl Maven Pro - screencasts with articles
As a Perl Maven Pro subscriber you will enjoy a library of articles and 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.