Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Better errors during installation if Keyboard Maestro Engine isn't ru…


Hopefully this will also stop CPAN Testers complaining at me
  • Loading branch information...
1 parent e596787 commit cad3f269f501de5511d9b1a200b2b9c1a38a5a80 @2shortplanks committed
Showing with 33 additions and 1 deletion.
  1. +2 −1  CHANGES
  2. +31 −0 Makefile.PL
@@ -1,5 +1,6 @@
1.01 Better (and more accurate) documentation.
Tests to ensure non-existent variables return the empty string
Better error messages when you use an invalid variable name
+ Better error messages during installation when no Keyboard Maestro Engine
-1.00 Initial release
+1.00 Initial release
31 Makefile.PL
@@ -1,3 +1,34 @@
+ # indicate for CPAN testers that we only support OS X
+ unless ($^O eq "darwin") {
+ die "OS unsupported\n";
+ }
+ # check that Keyboard Maestro is running and cowardly refuse to
+ # install if it's not
+ unless (`ps x` =~ /Keyboard Maestro Engine/ || $ENV{PERL_KM_FORCE}) {
+ print STDERR <<'BLURB';
+This module requires Keyboard Maestro to be installed. The Keboard Maestro
+Engine (the doohicky that sits in your menubar) doesn't seem to be running.
+You can download a version of Keyboard Maestro (with a free trial) from:
+Giving up without creating a Makefile. Please re-run Makefile.PL once you've
+installed and started Keyboard Maestro Engine.
+(If for some reason you really want to install this module without first
+installing Keyboard Maestro and you don't mind the test suite of this module
+failing then set the PERL_KM_FORCE environment variable to true before running
+this Makefile.PL)
+ # as per
+ exit 0;
+ }
use inc::Module::Install;
name 'Mac-KeyboardMaestro';

0 comments on commit cad3f26

Please sign in to comment.
Something went wrong with that request. Please try again.