Konstrukt::Plugin::wiki::markup::link - Inline plugin to handle links
my $l = use_plugin 'wiki::markup::link'; my $rv = $l->process($tag);
This one will look for (internal and external, implicit and explicit) links and converts them into HTML-links.
You may define a list of link plugins that will handle the different link types. The first plugin that matches a link will handle it. So the list should be sorted by descending specificity.
The defaults are:
wiki/link/plugins nolink image file external wiki
Note that the wiki plugin should be the last one in the chain since it acts like a catchall plugin ans will match all explicit links.
Implicit links
CamelCase or SomePage http://foo.bar/baz !NoLink
Explicit links
Explicit links are required here [[nocamelcase]] or here [[NoSpaceAroundLink]]. [[SomePage|But with some other description]] [[http://foo.bar/baz|somthing here]]
Initialization.
This method will do the work. Will look for new links inside the text and will also check if the target of existing wiki links exists or not.
Parameters:
$nodes - Container node (of type Konstrukt::Parser::Node) containing all (text-)nodes of this documents.
Will return the plugin responsible for a given link string or undef if no plugin matches.
Will only be used internally.
$plugins - Reference to an array containing arrayreferences each containing a matching regexp and the plugin.
$link - The link string
$type - Will be 'explicit' or 'implicit'. Determines the type of regexps to use to match the string.
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.
Konstrukt::Plugin::wiki
To install Konstrukt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Konstrukt
CPAN shell
perl -MCPAN -e shell install Konstrukt
For more information on module installation, please visit the detailed CPAN module installation guide.