in reply to Foo::Button->new vs. newButton()
I'm with merlyn and think that the downside of exporting stuff into the namespace outweigh the advantages of saving typing a few characters.
Any better ways?
If all the extra typing is really causing you problems you might consider shortening the class name by using a constant:
use Btn => 'Foo::Button'; ... $b = Btn->new(@args);
or variable
my $Btn => 'Foo::Button'; ... %b => $Btn->new(@args);
|
|---|