diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-03 19:58:58 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-03 19:58:58 +0000 |
commit | a44bfb158dac9e04647a75bc819a73bc18f5acce (patch) | |
tree | 557f34948ad08be08dc5bdc1d768fe396b861984 /IkiWiki/Plugin | |
parent | 4ba45ec3fc6d94657e23cecaca27bf4dc5c7c0a5 (diff) | |
download | ikiwiki-a44bfb158dac9e04647a75bc819a73bc18f5acce.tar ikiwiki-a44bfb158dac9e04647a75bc819a73bc18f5acce.tar.gz |
change plugin interface to use named parameters for flexability
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/brokenlinks.pm | 3 | ||||
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 3 | ||||
-rw-r--r-- | IkiWiki/Plugin/orphans.pm | 3 | ||||
-rw-r--r-- | IkiWiki/Plugin/pagecount.pm | 3 | ||||
-rw-r--r-- | IkiWiki/Plugin/skeleton.pm | 5 |
5 files changed, 11 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm index 75c819d76..8b91391fe 100644 --- a/IkiWiki/Plugin/brokenlinks.pm +++ b/IkiWiki/Plugin/brokenlinks.pm @@ -7,7 +7,8 @@ use strict; use IkiWiki; sub import { #{{{ - IkiWiki::register_plugin("preprocess", "brokenlinks", \&preprocess); + IkiWiki::hook(type => "preprocess", id => "brokenlinks", + call => \&preprocess); } # }}} sub preprocess (@) { #{{{ diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index c554774f6..61b4a8523 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -7,7 +7,8 @@ use strict; use IkiWiki; sub import { #{{{ - IkiWiki::register_plugin("preprocess", "inline", \&IkiWiki::preprocess_inline); + IkiWiki::hook(type => "preprocess", id => "inline", + call => \&IkiWiki::preprocess_inline); } # }}} # Back to ikiwiki namespace for the rest, this code is very much diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index bd3c6b8b9..945892d17 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -7,7 +7,8 @@ use strict; use IkiWiki; sub import { #{{{ - IkiWiki::register_plugin("preprocess", "orphans", \&preprocess); + IkiWiki::hook(type => "preprocess", id => "orphans", + call => \&preprocess); } # }}} sub preprocess (@) { #{{{ diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index fc69e449b..8a1376e09 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -7,7 +7,8 @@ use strict; use IkiWiki; sub import { #{{{ - IkiWiki::register_plugin("preprocess", "pagecount", \&preprocess); + IkiWiki::hook(type => "preprocess", id => "pagecount", + call => \&preprocess); } # }}} sub preprocess (@) { #{{{ diff --git a/IkiWiki/Plugin/skeleton.pm b/IkiWiki/Plugin/skeleton.pm index c9a7a421d..89308c45f 100644 --- a/IkiWiki/Plugin/skeleton.pm +++ b/IkiWiki/Plugin/skeleton.pm @@ -1,6 +1,6 @@ #!/usr/bin/perl # Ikiwiki skeleton plugin. Replace "skeleton" with the name of your plugin -# in the lines below, and flesh out the methods to make it do something. +# in the lines below, and flesh out the code to make it do something. package IkiWiki::Plugin::skeleton; use warnings; @@ -8,7 +8,8 @@ use strict; use IkiWiki; sub import { #{{{ - IkiWiki::register_plugin("preprocess", "skeleton", \&preprocess); + IkiWiki::hook(type => "preprocess", id => "skeleton", + call => \&preprocess); } # }}} sub preprocess (@) { #{{{ |