Skip to content

Instantly share code, notes, and snippets.

@jazzl0ver
Created December 28, 2023 12:53
Show Gist options
  • Save jazzl0ver/c99a8c177ab18327c0d04287cb13209a to your computer and use it in GitHub Desktop.
Save jazzl0ver/c99a8c177ab18327c0d04287cb13209a to your computer and use it in GitHub Desktop.
fixing "Use of uninitialized value $t in substitution (s///) at /usr/bin/cfgmaker line 1377"
--- cfgmaker.orig 2014-04-04 09:10:43.000000000 +0400
+++ cfgmaker 2017-07-17 13:57:26.000000000 +0300
@@ -16,7 +16,8 @@
# snpo - SNMP Polling
# snpd - SNMP Detail
#@main::DEBUG=qw(base);
-@main::DEBUG=qw(base snpo snpd);
+#@main::DEBUG=qw(base snpo snpd);
+@main::DEBUG=qw();
require 5.005;
use strict;
@@ -1370,6 +1371,7 @@
for my $g (@{$$opt{"global"}}) {
my ($t,$fs);
$g =~ /^options\[([_^\$])\]:\s*(.*)$/i;
+ next unless (defined $1 && defined $2);
$t = $1;
$fs = $2;
$t =~ s/_/default/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment