http://qs321.pair.com?node_id=818871


in reply to Question about __PACKAGE__

These are exactly the same after the compile stage
__PACKAGE__->hello('text1'); Foo->hello('text1');
These are also the same
hello(__PACKAGE__, 'text1'); hello('Foo', 'text1');
The difference between f('x') and 'x'->f() is that if there is no sub f {} in Foo @INC will be used to look for one.

Look at UNIVERSAL and perltoot.

-- gam3
A picture is worth a thousand words, but takes 200K.