in reply to Re: Re: Methods supporting both package and OOP style calls
in thread Methods supporting both package and OOP style calls
Perl being what it is, there are cheats to make a sub approximate these behaviors, but they are generally obfuscated and dangerous. If you want an object, use one. If you don't need any of that stuff, don't use OO.
Modules like CGI.pm give many people incorrect ideas about OO, i.e. that it's nothing more than a different syntax. If you look inside the code for that monster you see that CGI.pm only works at all by using a bunch of globals and assuming that only one CGI object will exist at a time. And ask Ovid how much fun it is to subclass.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(4): Methods supporting both package and OOP style calls
by mojotoad (Monsignor) on Aug 07, 2002 at 16:59 UTC |