r3 - 21 Oct 2004 - 07:00:35 - PeterThoenyYou are here: TWiki >  Codev Web > GetPluginPreferencesFlagDoesNotWork > GetPluginPreferencesValueBroken
Tags:
, create new tag
TWiki::Func::getPluginPreferencesValue makes an unreasonable assumption, namely that it will always be called from a package named the same as the plugin.

It uses caller and strips leading \w+:: from it to 'generate' the plugin name. This is fine if I call it from within TWiki::Plugins::MyPlugin but broken in any other package, for example TWiki::Plugins::MyPlugin::MyPackage or even if I have more than one package in my plugin file.

The obvious fix is documentation; "this method can only be called from within the main package of a plugin".

Or "Ignore this function, use TWiki::Func::getPreferencesValue instead" hehe!

-- CrawfordCurrie - 19 Sep 2004

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo