]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/haiku.pm
releasing version 2.31.1
[git.ikiwiki.info.git] / IkiWiki / Plugin / haiku.pm
index e2873ec6f56f7a65cf51f6b23813eed4b3926099..35208e56cfcc307ba95f23555ec537d1b78859e7 100644 (file)
@@ -4,11 +4,10 @@ package IkiWiki::Plugin::haiku;
 
 use warnings;
 use strict;
-use IkiWiki;
+use IkiWiki 2.00;
 
 sub import { #{{{
-       IkiWiki::hook(type => "preprocess", id => "haiku",
-               call => \&preprocess);
+       hook(type => "preprocess", id => "haiku", call => \&preprocess);
 } # }}}
 
 sub preprocess (@) { #{{{
@@ -16,7 +15,7 @@ sub preprocess (@) { #{{{
 
        my $haiku;
        eval q{use Coy};
-       if ($@) {
+       if ($@ || ! Coy->can("Coy::with_haiku")) {
                my @canned=(
                        "The lack of a Coy:
                         No darting, subtle haiku.