diff --git a/bin/shutter b/bin/shutter index 58a42940..53c9433a 100755 --- a/bin/shutter +++ b/bin/shutter @@ -197,6 +197,7 @@ my $nautilus_sendto = TRUE; my $goocanvas = TRUE; my $exiftool = TRUE; my $appindicator = TRUE; +my $pathclass = TRUE; fct_init_depend(); #-------------------------------------- @@ -8359,6 +8360,9 @@ sub STARTUP { #parse filename my ($name, $folder, $type) = fileparse($ukey, qr/\.[^.]*/); + #skip Imgur if optional dependency Path::Class not met + next if ($name eq 'Imgur' && !$pathclass); + #~ print $name, $folder, $type, "\n"; if ( !exists $accounts{$name} @@ -9392,6 +9396,13 @@ sub STARTUP { $exiftool = FALSE; } + #Path::Class + eval { require Path::Class }; + if ($@) { + warn "WARNING: Path::Class is missing --> uploading to Imgur will be disabled!\n\n"; + $pathclass = FALSE; + } + #dev-libs/libappindicator[introspection] eval { Glib::Object::Introspection->setup(