[rt-devel] plugins and _Vendor files

Ruslan Zakirov ruz at bestpractical.com
Tue Jun 11 09:02:54 EDT 2013


On Tue, Jun 11, 2013 at 10:22 AM, Christian Loos <cloos at netcologne.de>wrote:

> Am 10.06.2013 20:36, schrieb Ruslan Zakirov:
> > see lib/RT/IR.pm in RTIR extension. We basicly wrap methods from
> > extensions' primary file.
>
> You use here Hook::LexWrap and I saw some commit comments that
> Hook::LexWrap makes some troubles:
> https://github.com/bestpractical/rt-extension-mergeusers/commit/354edf0


In recent code we don't use Hook::LexWrap as it's in most case unnecesary.
Something close to the following should work just fine:

require RT::XXX;
{
    my $orig = RT::XXX->can("method");
    *RT::XXX::method = sub {
        my $self = shift;
        return $orig->($self, @_);
    };
}

Chris
>
>
> --
> RT Training in Seattle, June 19-20: http://bestpractical.com/training
>



-- 
Best regards, Ruslan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20130611/0e172006/attachment.html>


More information about the rt-devel mailing list