]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/haiku.pm
fix links to sparklines; abs2rel -> urlto
[git.ikiwiki.info.git] / IkiWiki / Plugin / haiku.pm
index e2873ec6f56f7a65cf51f6b23813eed4b3926099..fe8a782fad2ffdf5c83c4ecb0c86f269195dd2d7 100644 (file)
@@ -7,8 +7,7 @@ use strict;
 use IkiWiki;
 
 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.