summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-20 03:59:35 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-20 03:59:35 +0000
commit2725887734c318350875501e64561f79b8866dfe (patch)
treee692e726e2e726b1c8237fb6d6aded857570bfba /IkiWiki/Plugin
parentd065842775898799d85482336721c94076c7cb5f (diff)
* Make img plugin not fail immediately if Image::Magick is not available.
This lets ikiwiki not build depend on perlmagic.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/img.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index 120326910..2a6533e39 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -6,7 +6,6 @@ package IkiWiki::Plugin::img;
use warnings;
use strict;
use IkiWiki;
-use Image::Magick;
my %imgdefaults;
@@ -37,6 +36,9 @@ sub preprocess (@) { #{{{
my $dir = IkiWiki::dirname($file);
my $base = IkiWiki::basename($file);
+
+ eval q{use Image::Magick};
+ error($@) if $@;
my $im = Image::Magick->new;
my $imglink;
my $r;