Tags:
create new tag
, view all tags
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

 
Topic revision: r3 - 2004-10-21 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.