in reply to Here's a quick example why not to use Indirect notation
in thread Perl High School

Hmmm...
package Gotcha; sub bar { print "Didn't think you would go here, huh?\n"; } package Foo; sub bar { print "This is what you probably thought would happen?\n"; } package main; sub Foo { "Gotcha"; } Foo->bar(); Foo::->bar();
Unless you always slip that :: in, the main reason that the direct notation is safer than the indirect is that you are more likely to give different classes the same method names than you are to name a function and a class the same thing.

That said, my aesthetic preference is for the direct notation.

  • Comment on Re (tilly) 1: Here's a quick example why not to use Indirect notation
  • Download Code