import rt 2.0.14
[freeside.git] / rt / docs / design_docs / local_hacking
1 To facilitate local hacking, RT needs a mechanism to allow site administrators
2 to easily add HTML templates for the web ui and to replace sections
3 of code in RT's core modules _without_ having to modify those modules
4
5 We'll use several methods to achieve this goal.
6
7         Webui
8                 HTML::Mason allows users to create multiple
9 component hierarchies.  RT should ship with a local component root
10 defined and available. This root should be configured as the "primary"
11 component root.
12
13
14         Core modules
15
16         This gets a bit trickier. we want to allow people to trivially
17 subclass core modules and to use those subclasses throughout the code.
18
19 The way we're going to handle this is by setting up a number of subroutines
20 in config.pm that look something like this:
21
22 sub NewTicketObj {
23         eval "require $TicketClass";
24         my $object = new $TicketClass;
25         return ($object);
26 }
27
28 # This variable is used for ref type checking
29 $TicketClass = "RT::Ticket";
30
31 we could use an eval around the require and thus completely avoid specifying
32 the object in two places. which feels like a win. but i'm worried about perf.