[rt-devel] extending rt3 classes?

darren chamberlain darren at boston.com
Thu Oct 9 13:32:42 EDT 2003


* Alex Porras <alex at mediaocean.com> [2003-10-09 13:18]:
> Can someone point me to some documentation for extending rt3 classes?
> We have a type of class we'd like to implement, that is similar to a
> ticket, and the idea I had in mind was to subclass Ticket.pm, but, I'm
> not sure that's possible because of the *_Overlay structure.

The *_Local.pm files are where you would add your local changes.  If
the _Local.pm file doesn't exist, you can simply make it.  The end of
each .pm file has something like:

        eval "require RT::Tickets_Local";
        if ($@ && $@ !~ qr{^Can't locate RT/Tickets_Local.pm}) {
            die $@;
        };

The compiler will drag in your _Local version if it exists.  Also, it
simply has to be somewhere that the compiler can find it, and not
necessarily in the same directory as the module you are extending.

(darren)

-- 
One man's "magic" is another man's engineering.  "Supernatural" is a
null word.
    -- Robert Heinlein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 269 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20031009/0be0a3e0/attachment.pgp


More information about the Rt-devel mailing list