Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #82 from duckduckgo/jag/message

DuckPAN/DDG: Make load error message work for 5.16
  • Loading branch information...
commit 4750116aa224969ffb64e973fccaa7ac495ed285 2 parents 8e8f91d + 4c6dd52
Zaahir Moolla moollaza authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/App/DuckPAN/DDG.pm
7 lib/App/DuckPAN/DDG.pm
View
@@ -90,8 +90,11 @@ sub get_blocks_from_current_dir {
print " - $class (" . $class->triggers_block_type . ")\n";
} else {
# Get the module name that needs to be installed by the user.
- if($load_error_message =~ /you may need to install the ([^\s]+) module/) {
- $failed_to_load{$class} = "Please install $1 and any other required dependencies to use this instant answer.";
+ if($load_error_message =~ /Can't locate ([^\.]+).pm in \@INC/) {
+ $load_error_message = $1;
+ $load_error_message =~ s/\//::/g;
+
+ $failed_to_load{$class} = "Please install $load_error_message and any other required dependencies to use this instant answer.";
} else {
# We just set the value to whatever the error message was if it failed for some other reason.
$failed_to_load{$class} = $load_error_message;
Please sign in to comment.
Something went wrong with that request. Please try again.