in reply to Foo::Button->new vs. newButton()
Soo, you won't polute namespaces, and can make an automation of the package names that new:: will handle, since you don't need to implement any of the methods (Button, Label), you just use AUTOLOAD. Also you can make new:: load automatically the modules, soo you don't need to make use Button, before create it.my $oo = wrapper::package() ; ## that can be something like that: my $oo = new::Button() ; my $oo = new::Label() ; ...
But I still preffer the normal way! ;-P
Well, I have just released Class::HPLOO for a easier way to declare classes and PerlModules. Maybe this can be useful for you.
Graciliano M. P.
"Creativity is the expression of the liberty".
|
|---|