One of the ways I've found is to check if Perl Debugger is loaded if it is defined for a specific ($ DB :: single) and it is assumed that Komodo is active if $ DB :: single is defined.
But it could also mean that the script legitimately works like perl -d under a "standalone" debugger.
#!/usr/local/ActivePerl-5.10/bin/perl use strict; use warnings; use feature qw/say switch/; # detect debugger .. SayDebugerStatus(); sub SayDebugerStatus { print "Debugger "; given ($DB::single) { when (undef) { say "not loaded."; } when (0) { say "loaded but inactive"; } default { say "loaded and active"; } } return defined($DB::single) ? 1:0; }
Sentence
zakovyrya leads to:
if ( grep( /.*Komodo\ IDE\.app/g, values %INC) ){ say "Komodo is running" } else { say "Komodo is not running" };
But is there any other way?
UPDATE today my isKomodo () routine failed. Some research has shown that IT has changed my global path settings from βlongβ to βshortβ names (this is under Windows). There nolonger is the string "KOMODO" in the% INC hash.
I am looking for a replacement.
source share