Subclassing Kwiki::Formatter outside of kwiki
[email protected] (Thomas Klausner) Wed, 27 Oct 2004 15:26:22 +0200
| Newsgroups | perl.kwiki |
|---|---|
| Message-ID | <[email protected]> |
Hi!
I recently uploaded Template::Plugin::KwikiFormat to CPAN. It makes
KwikiFormattingRules usable outside of kiwki (in Template::Toolkit)
This mostly works but as I'm not running a proper kwiki, I have problems
with WikiLinks. WikiLinks are normally converted to a link to the respective
page by looking up the WikiLink somewhere (method html in
Kwiki::Formatter::WikiLink).
The problem is that this dies with
can't locate object method "database_directory" via package "Kwiki::Config
which makes sense, as I didn't configure anything, nor have a proper kwiki
somewhere...
So, I want to override Kwiki::Formatter::WikiLink and
Kwiki::Formatter::TitledWikiLink
but how?
What I want to do is to subclass Kwiki::Formatter, which should use all
classes/methods as usually, besides WikiLink and TitledWikiLink, for which I
want to provide custom classes/methods that do nothing.
All the code samples I found on http://www.kwiki.org seem to only work in a
kwiki context.
So I would really appreciate if somebody could point out to me how to do
this...
(crossposted from #kwiki, BTW)
--
#!/usr/bin/perl http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}