in reply to
$foo = "Foo::Bar"; $foo->new() works?
Er, the exact same reason:
Foo::Bar::Baz->new()
[download]
works. Perl just needs a package name as a string to look up the appropiate method, it doesn't care if the string is in the form of a bareword or contained in a scalar.
Comment on
Re: $foo = "Foo::Bar"; $foo->new() works?
Download
Code
In Section
Seekers of Perl Wisdom