finalise version 3.00 of the plugin api

master
Joey Hess 2008-12-23 16:34:19 -05:00
parent 7e7739bdd9
commit 678d467a40
90 changed files with 98 additions and 94 deletions

View File

@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
inject inject
%config %links %pagestate %wikistate %renderedfiles %config %links %pagestate %wikistate %renderedfiles
%pagesources %destsources); %pagesources %destsources);
our $VERSION = 2.00; # plugin interface version, next is ikiwiki version our $VERSION = 3.00; # plugin interface version, next is ikiwiki version
our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::aggregate;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Parser; use HTML::Parser;
use HTML::Tagset; use HTML::Tagset;
use HTML::Entities; use HTML::Entities;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::amazon_s3;
use warnings; use warnings;
no warnings 'redefine'; no warnings 'redefine';
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IkiWiki::Render; use IkiWiki::Render;
use Net::Amazon::S3; use Net::Amazon::S3;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::anonok;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "anonok", call => \&getsetup); hook(type => "getsetup", id => "anonok", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::attachment;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
add_underlay("javascript"); add_underlay("javascript");

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::autoindex;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::brokenlinks;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "brokenlinks", call => \&getsetup); hook(type => "getsetup", id => "brokenlinks", call => \&getsetup);

View File

@ -20,7 +20,7 @@ package IkiWiki::Plugin::calendar;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Time::Local; use Time::Local;
use POSIX; use POSIX;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::camelcase;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
# This regexp is based on the one in Text::WikiFormat. # This regexp is based on the one in Text::WikiFormat.
my $link_regexp=qr{ my $link_regexp=qr{

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::color;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "preprocess", id => "color", call => \&preprocess); hook(type => "preprocess", id => "color", call => \&preprocess);

View File

@ -7,7 +7,7 @@ package IkiWiki::Plugin::comments;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
use POSIX qw(strftime); use POSIX qw(strftime);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::conditional;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use UNIVERSAL; use UNIVERSAL;
sub import { sub import {

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::creole;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "creole", call => \&getsetup); hook(type => "getsetup", id => "creole", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::cutpaste;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %savedtext; my %savedtext;

View File

@ -2,7 +2,7 @@
# Discordian date support fnord ikiwiki. # Discordian date support fnord ikiwiki.
package IkiWiki::Plugin::ddate; package IkiWiki::Plugin::ddate;
use IkiWiki 2.00; use IkiWiki 3.00;
no warnings; no warnings;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::editdiff;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Entities; use HTML::Entities;
use IPC::Open2; use IPC::Open2;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::edittemplate;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Template; use HTML::Template;
use Encode; use Encode;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::embed;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $attribr=qr/[^<>"]+/; my $attribr=qr/[^<>"]+/;

View File

@ -6,7 +6,7 @@ package IkiWiki::Plugin::external;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use RPC::XML; use RPC::XML;
use RPC::XML::Parser; use RPC::XML::Parser;
use IPC::Open2; use IPC::Open2;

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::favicon;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "favicon", call => \&getsetup); hook(type => "getsetup", id => "favicon", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::filecheck;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %units=( #{{{ # size in bytes my %units=( #{{{ # size in bytes
B => 1, B => 1,

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::format;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "preprocess", id => "format", call => \&preprocess); hook(type => "preprocess", id => "format", call => \&preprocess);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::fortune;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "fortune", call => \&getsetup); hook(type => "getsetup", id => "fortune", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::goodstuff;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my @bundle=qw{ my @bundle=qw{
brokenlinks brokenlinks

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::google;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use URI; use URI;
my $host; my $host;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::googlecalendar;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "googlecalendar", hook(type => "getsetup", id => "googlecalendar",

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::graphviz;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::haiku;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "haiku", call => \&getsetup); hook(type => "getsetup", id => "haiku", call => \&getsetup);

View File

@ -10,7 +10,7 @@ package IkiWiki::Plugin::hnb;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use File::Temp qw(:mktemp); use File::Temp qw(:mktemp);
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::html;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "html", call => \&getsetup); hook(type => "getsetup", id => "html", call => \&getsetup);

View File

@ -9,7 +9,7 @@ package IkiWiki::Plugin::htmlbalance;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::TreeBuilder; use HTML::TreeBuilder;
use HTML::Entities; use HTML::Entities;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::htmlscrubber;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
# This regexp matches urls that are in a known safe scheme. # This regexp matches urls that are in a known safe scheme.
# Feel free to use it from other plugins. # Feel free to use it from other plugins.

View File

@ -9,7 +9,7 @@ package IkiWiki::Plugin::htmltidy;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::httpauth;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "httpauth", call => \&getsetup); hook(type => "getsetup", id => "httpauth", call => \&getsetup);

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::img;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %imgdefaults; my %imgdefaults;

View File

@ -5,7 +5,7 @@ package IkiWiki::Plugin::inline;
use warnings; use warnings;
use strict; use strict;
use Encode; use Encode;
use IkiWiki 2.00; use IkiWiki 3.00;
use URI; use URI;
my %knownfeeds; my %knownfeeds;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::link;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $link_regexp; my $link_regexp;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::linkmap;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::listdirectives;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
add_underlay("directives"); add_underlay("directives");

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::lockedit;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "lockedit", call => \&getsetup); hook(type => "getsetup", id => "lockedit", call => \&getsetup);

View File

@ -9,7 +9,7 @@ package IkiWiki::Plugin::map;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "map", call => \&getsetup); hook(type => "getsetup", id => "map", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::mdwn;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "mdwn", call => \&getsetup); hook(type => "getsetup", id => "mdwn", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::meta;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %metaheaders; my %metaheaders;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::mirrorlist;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "mirrorlist", call => \&getsetup); hook(type => "getsetup", id => "mirrorlist", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::more;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $linktext = gettext("more"); my $linktext = gettext("more");

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::opendiscussion;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "opendiscussion", call => \&getsetup); hook(type => "getsetup", id => "opendiscussion", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::openid;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getopt", id => "openid", call => \&getopt); hook(type => "getopt", id => "openid", call => \&getopt);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::orphans;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "orphans", call => \&getsetup); hook(type => "getsetup", id => "orphans", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::otl;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use open qw{:utf8 :std}; use open qw{:utf8 :std};
sub import { sub import {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagecount;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "pagecount", call => \&getsetup); hook(type => "getsetup", id => "pagecount", call => \&getsetup);

View File

@ -12,7 +12,7 @@ package IkiWiki::Plugin::pagestats;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
# Names of the HTML classes to use for the tag cloud # Names of the HTML classes to use for the tag cloud
our @classes = ('smallestPC', 'smallPC', 'normalPC', 'bigPC', 'biggestPC' ); our @classes = ('smallestPC', 'smallPC', 'normalPC', 'bigPC', 'biggestPC' );

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pagetemplate;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %templates; my %templates;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::parentlinks;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks); hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::passwordauth;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup); hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pingee;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "pingee", call => \&getsetup); hook(type => "getsetup", id => "pingee", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::pinger;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %pages; my %pages;
my $pinged=0; my $pinged=0;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::poll;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
sub import { sub import {

View File

@ -7,7 +7,7 @@ package IkiWiki::Plugin::polygen;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use File::Find; use File::Find;
sub import { sub import {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::postsparkline;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
IkiWiki::loadplugin('sparkline'); IkiWiki::loadplugin('sparkline');

View File

@ -1,6 +1,6 @@
#!/usr/bin/perl #!/usr/bin/perl
package IkiWiki::Plugin::prettydate; package IkiWiki::Plugin::prettydate;
use IkiWiki 2.00; use IkiWiki 3.00;
use warnings; use warnings;
no warnings 'redefine'; no warnings 'redefine';
use strict; use strict;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::progress;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my $percentage_pattern = qr/[0-9]+\%?/; # pattern to validate percentages my $percentage_pattern = qr/[0-9]+\%?/; # pattern to validate percentages

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::rawhtml;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "rawhtml", call => \&getsetup); hook(type => "getsetup", id => "rawhtml", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::recentchanges;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
use HTML::Entities; use HTML::Entities;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::recentchangesdiff;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Entities; use HTML::Entities;
my $maxlines=200; my $maxlines=200;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::relativedate;
use warnings; use warnings;
no warnings 'redefine'; no warnings 'redefine';
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use POSIX; use POSIX;
use Encode; use Encode;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::remove;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "remove", call => \&getsetup); hook(type => "getsetup", id => "remove", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::rename;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "rename", call => \&getsetup); hook(type => "getsetup", id => "rename", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::search;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "search", call => \&getsetup); hook(type => "getsetup", id => "search", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::shortcut;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "shortcut", call => \&getsetup); hook(type => "getsetup", id => "shortcut", call => \&getsetup);

View File

@ -6,7 +6,7 @@ package IkiWiki::Plugin::sidebar;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "sidebar", call => \&getsetup); hook(type => "getsetup", id => "sidebar", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::signinedit;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "signinedit", call => \&getsetup); hook(type => "getsetup", id => "signinedit", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::smiley;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %smileys; my %smileys;
my $smiley_regexp; my $smiley_regexp;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::sparkline;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use IPC::Open2; use IPC::Open2;
my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/; my $match_num=qr/[-+]?[0-9]+(?:\.[0-9]+)?/;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::table;
use warnings; use warnings;
use strict; use strict;
use Encode; use Encode;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "table", call => \&getsetup); hook(type => "getsetup", id => "table", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::tag;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
my %tags; my %tags;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::template;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Template; use HTML::Template;
use Encode; use Encode;

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::testpagespec;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "testpagespec", call => \&getsetup); hook(type => "getsetup", id => "testpagespec", call => \&getsetup);

View File

@ -8,7 +8,7 @@ use strict;
use Digest::MD5 qw(md5_hex); use Digest::MD5 qw(md5_hex);
use File::Temp qw(tempdir); use File::Temp qw(tempdir);
use HTML::Entities; use HTML::Entities;
use IkiWiki 2.00; use IkiWiki 3.00;
my $default_prefix = <<EOPREFIX; my $default_prefix = <<EOPREFIX;
\\documentclass{article} \\documentclass{article}

View File

@ -6,7 +6,7 @@ package IkiWiki::Plugin::textile;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use Encode; use Encode;
sub import { sub import {

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::toc;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Parser; use HTML::Parser;
sub import { sub import {

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::toggle;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
add_underlay("javascript"); add_underlay("javascript");

View File

@ -8,7 +8,7 @@ package IkiWiki::Plugin::txt;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
use HTML::Entities; use HTML::Entities;
my $findurl=0; my $findurl=0;

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::typography;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getopt", id => "typography", call => \&getopt); hook(type => "getopt", id => "typography", call => \&getopt);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::version;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "version", call => \&getsetup); hook(type => "getsetup", id => "version", call => \&getsetup);

View File

@ -3,7 +3,7 @@ package IkiWiki::Plugin::websetup;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "websetup", call => \&getsetup); hook(type => "getsetup", id => "websetup", call => \&getsetup);

View File

@ -4,7 +4,7 @@ package IkiWiki::Plugin::wikitext;
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
sub import { sub import {
hook(type => "getsetup", id => "wiki", call => \&getsetup); hook(type => "getsetup", id => "wiki", call => \&getsetup);

View File

@ -19,7 +19,7 @@ that can be fleshed out to make a useful plugin.
`IkiWiki::Plugin::pagecount` is another simple example. All perl plugins `IkiWiki::Plugin::pagecount` is another simple example. All perl plugins
should `use IkiWiki` to import the ikiwiki plugin interface. It's a good should `use IkiWiki` to import the ikiwiki plugin interface. It's a good
idea to include the version number of the plugin interface that your plugin idea to include the version number of the plugin interface that your plugin
expects: `use IkiWiki 2.00`. expects: `use IkiWiki 3.00`.
An external plugin is an executable program. It can be written in any An external plugin is an executable program. It can be written in any
language. Its interface to ikiwiki is via XML RPC, which it reads from language. Its interface to ikiwiki is via XML RPC, which it reads from
@ -431,7 +431,7 @@ describes the plugin as a whole. For example:
To import the ikiwiki plugin interface: To import the ikiwiki plugin interface:
use IkiWiki '2.00'; use IkiWiki '3.00';
This will import several variables and functions into your plugin's This will import several variables and functions into your plugin's
namespace. These variables and functions are the ones most plugins need, namespace. These variables and functions are the ones most plugins need,

View File

@ -27,7 +27,7 @@ important one is the IkiWiki module.
use warnings; use warnings;
use strict; use strict;
use IkiWiki 2.00; use IkiWiki 3.00;
Ok, boilerplate is out of the way. Now to add the one function that ikiwiki Ok, boilerplate is out of the way. Now to add the one function that ikiwiki
expects to find in any module: `import`. The import function is called when expects to find in any module: `import`. The import function is called when

View File

@ -36,12 +36,14 @@ really bad bugs will be applied going forward.
# 3.0 # 3.0
Version 3.0 is an opportunity to make significant transitions, and also adds Version 3.0 is an opportunity to make significant transitions.
many new features. Read [[tips/upgrade_to_3.0]] for the steps you will need to
follow when upgrading your wiki to this version.
* See [[tips/upgrade_to_3.0]] for the steps you will need to follow The highlights of the changes in version 3.0 include:
when upgrading to this version.
* Finalise a new version of the plugin API, exporting additional commonly
* A new version of the plugin API, exporting additional commonly
used functions from IkiWiki.pm. See [[todo/firm_up_plugin_interface]] used functions from IkiWiki.pm. See [[todo/firm_up_plugin_interface]]
It will include a vast number of new features, bugfixes, and other It will include a vast number of new features, bugfixes, and other

View File

@ -92,3 +92,5 @@ Probably needs to evolve more and be more widely used before being exported.
* %IkiWiki::pagecase (aggregate) * %IkiWiki::pagecase (aggregate)
* %IkiWiki::backlinks (pagestats) * %IkiWiki::backlinks (pagestats)
[[done]] (until 4.0)..