X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/a14548a6ca2bf384408b2a5f58aa337f55a392bf..122636308f908e877342a9ec2b361eaba2e9b637:/IkiWiki/Plugin/haiku.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/haiku.pm b/IkiWiki/Plugin/haiku.pm index e2873ec6f..fe8a782fa 100644 --- a/IkiWiki/Plugin/haiku.pm +++ b/IkiWiki/Plugin/haiku.pm @@ -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.