The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Kwiki::Backlinks - Maintain and display a simple database of links to the current page


Kwiki::Backlinks uses the file system to keep track of which pages in a wiki link to which pages in the same wiki. That data is then used to display on every page in the wiki. This is considered a nice feature by some and an absolute requirement for enabling emergent understanding by others.

You can see Kwiki::Backlinks in action at

This code also happens to demonstrate a novel use of Spoon hooks.

The backlinks database may also be used as a generic database of linking activity in the wiki. Kwiki::Orphans uses the database to reveal pages which have no incoming links. The backlinks for any given page can be found the the following incantation:

    @backlinks = $self->hub->backlinks->get_backlinks_for_page($page->id);

This returns a list of page ids.


Chris Dent, <> Brian Ingerson, <>


Thanks to Ricardo SIGNES for the idea and patch for showing backlinks on the edit page. Small price for very valuable gain.


Kwiki Spoon::Hooks


Copyright (C) 2005, Chris Dent

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.