use MIME::Entity;
use Pod::Usage;
-use Config::Auto;
use Sys::SigAction qw/timeout_call/;
use Encode;
# Try and load a config file first, and then allow the command line
-# to over ride what is in the config file.
-my $c = eval {
- Config::Auto::parse("mythtv-status.yml",
- format => 'yaml',
- )
-};
-if ($@ && $@ !~ /^No config file found/) {
- # Die on any issues loading the config file, apart from it not existing.
- die $@;
+# to override what is in the config file.
+my ($c);
+
+if (eval("{ local \$SIG{__DIE__}; require Config::Auto; }")) {
+ $c = eval {
+ Config::Auto::parse("mythtv-status.yml", format => 'yaml')
+ };
+
+ if ($@ && $@ !~ /^No config file found/) {
+ # Die on any issues loading the config file, apart from it not existing.
+ die $@;
+ }
}
# Some sane defaults.