in reply to Question about new()

No. new is in package My::Foo (or one of its descendants), not in unrelated package Foo. You seem to missing that Foo is a fully qualified package name.

Now, if the current package had a function named Foo that returned the string "My::Foo", ...

Replies are listed 'Best First'.
Re^2: Question about new()
by MidLifeXis (Monsignor) on Jan 22, 2010 at 18:11 UTC

    This was the first thing I thought of as well. My second thought was to add it through Exporter. My third thought was "eeewwww".

    It is said that "only perl can parse Perl." I don't even come close until my 3rd cup of coffee. --MidLifeXis