1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
RTFM's code overlaying technology
---------------------------------
the _Overlay system is docced inside each of the "Core" modules (perldoc
lib/RT/FM/Class.pm)
Basically, you've got :
Module.pm, which is mostly autogenerated code and documentation for the
base API (the one-level-above SQL stuff)
Module_Overlay.pm, which is my custom code on top of Module.pm
Module_Local.pm, which is a site's local custom code on top of
Module_Overlay.pm.
Module_Overlay.pm and Module_Local.pm are essentially "mixins" which
override methods and data inside Module.pm without adding the overhead
of an extra level of object-oriented indirection.
The upshot of all this is that you can create "Module_Local.pm", drop in
no warnings qw/overload/;
as the first line and then just drop in your own versions of subroutines
which override the system's core. This results in your being able to easily
extend the system without having to directly modify a single file in the
system's distributed source.
|