Learning Perl Objects, References & ModulesLearning Perl Objects, References & ModulesSearch this book

12.5. The Differences Between OO and Non-OO Modules

A primarily OO module is distinguished from a primarily non-OO module in two ways:

Because methods of the OO module are meant to be called as class methods, they should all set aside their first argument, which is the class name. This class name blesses a new instance but is otherwise ignored. Thus, you should not call OO modules as if they were functional modules, and vice versa. Stick with the design of the module.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.