https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15759
--- Comment #1 from Kyle M Hall <[email protected]> --- Created attachment 47740 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47740&action=edit Bug 15759 - Allow Koha::Object derived objects to be used as hashrefs On occasion, bugs in Koha have been revealed to be a mis-use of Koha::Object. This seems to be due to our long standing use of hashrefs for data in Koha. For instance, a developer may accidentally write: my $borrowernumber = $borrower->{borrowernumber}; instead of my $borrowernumber = $borrower->borrowernumber; Since our object is a blessed hashref, this does not cause an error. Instead, we just access that key of the hashref, which is almost certainly undefined. With some extra code in Koha/Object.pm, we can allow hashref-like use of our Objects, which will not only prevent these errors, but allow drop-in use of Koha::Objects where we currently use hashrefs! Test Plan: 1) Apply this patch 2) prove t/db_dependent/Borrower.t -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
