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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2004-10-21 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.