Item2168: feels to me like there should be a Foswiki::Func::isTagHandlerRegistered
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: n/a
ie
sub isTagHandlerRegistered {
my ( $tag ) = @_;
ASSERT($Foswiki::Plugins::SESSION) if DEBUG;
return exists($Foswiki::functionTags{$tag});
}
though obviously abstracted - in that Func should really call a method in Foswiki.pm, etc, etc, blah.
or to stop me from going mad, we could just have a flag on
registerTagHandler
which only registers the tag if its not already defined..
(atm i'm thinking of a backport of things like
GROUPINFO
, but i do wonder about plugins over-registering each other in what is a random order.
--
SvenDowideit - 27 Sep 2009
Rather than a flag to over-register, I'd rather require a "me, me, pick me" flag if you intend to replace. Thus by default it would be an error to re-register a tag. Only if you specify the "me only" flag would your registration over-write another, and once you have registered a "me only" tag, nobody else can register it even if they also give the "me only" flag.
--
CrawfordCurrie - 07 Oct 2009
Changed to Enhancement
--
KennethLavrsen - 09 Jan 2010