You are here: Foswiki>Tasks Web>Item331 (05 Dec 2008, OlivierRaginel)Edit Attach

Item331: Func broken when called via TWikiCompatibilityPlugin

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release:
Applies To: Engine
Component:
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: OlivierRaginel
For instance registerRESTHandler() has got a my $plugin = caller; in it ... which returns Func as the caller is the Func bridge of the TWikiCompatibilityPlugin for old TWiki plugins. The other Func methods might be broken as well when they are called via TWikiCompatibilityPlugin and have a caller in it.

Something like $plugin = caller(1) if $plugin eq 'TWiki::Func'; would fix it, but I can imagine that this all gets terribly inefficient. Most probably the Func bridge needs to be redesigned.

-- MichaelDaum - 28 Nov 2008

Well, "redesigned" might be a bit of overkill. It's simple enough to equivalence the few methods that use caller.

Re-opening the bug to make the alias alias only the function, as per: http://perldoc.perl.org/perlmod.html

Note for self: why not re-write all other functions too, aliases are quicker than function calls, and we're not using them anyway.

-- OlivierRaginel - 05 Dec 2008

ItemTemplate edit

Summary Func broken when called via TWikiCompatibilityPlugin
ReportedBy MichaelDaum
Codebase
SVN Range TWiki-4.2.3, Wed, 06 Aug 2008, build 17396
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:b9db1ab363cf distro:8d15141eac2c distro:d620f5611f10
ReleasedIn
Topic revision: r7 - 05 Dec 2008, OlivierRaginel
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy