Learning Perl Objects, References amp;amp; Modules [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Learning Perl Objects, References amp;amp; Modules [Electronic resources] - نسخه متنی

Randal L. Schwartz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید














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:


A
primarily OO module has functions that are
meant to be called as a class methods, possibly returning instances
upon which you issue further instance method calls.


A primarily non-OO
module generally doesn't export any functions at
all, making the import list rather irrelevant.



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.



/ 199