Skip to content

Instantly share code, notes, and snippets.

@exodist
Created November 1, 2023 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exodist/6308382122aad65bb74131cc3379ef01 to your computer and use it in GitHub Desktop.
Save exodist/6308382122aad65bb74131cc3379ef01 to your computer and use it in GitHub Desktop.
Use of uninitialized value $exit in exit at (file) line (20)
sub process_and_exit {
my $self = shift;
my ($child_pid) = @_;
my $guard = Scope::Guard->new(sub {
eval { $self->_die("Scope Leak inside collector") };
exit(255);
});
my $exit = 0;
unless (eval { $exit = $self->process($child_pid); 1 }) {
my $err = $@;
eval { $self->_die($err) } or $self->_warn($@);
$exit = 255;
}
eval { $guard->dismiss() };
exit($exit);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment