[Koha-bugs] [Bug 10900] New: Incorrect calling conventions accessing C4::Context

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 17 16:08:41 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10900

            Bug ID: 10900
           Summary: Incorrect calling conventions accessing C4::Context
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: gmcharlt at gmail.com
          Reporter: mtompset at hotmail.com
        QA Contact: testopia at bugs.koha-community.org

While trying to write tests (bug 10895), I was frustrated for an excessively
long time while trying to copy t/db_dependent/Members.t as a template. The
problem became apparent when I actually stop to note the difference between a
:: over a -> in the calling convention.

C4::Context->method passes the object as the first parameter.
C4::Context::function calls the routine in a purely functional way.

C4::Context methods should be called in an object oriented manner, particularly
things like C4::Context::set_userenv. Set/Get are very much OO things!

As pieces get fixed, the patches will drop here.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list