Never execute a my conditionally, and use then use declared variable under wider conditions. my $var = ... unless ...; ... $var ... is undefined behaviour.
Fix:
if (!$biuw->{const}{load_old}) { if ( my $exception = EcomImportUtilities::ageCheck( biuw => $biuw, feedpath => $feedfullpath, tablename => $TABLE ) ) { if ($exception->{exception} eq 'outofdate' || $exception->{exception} eq 'stillcopying ) { $biuw->{log}->warn( "$feedfullpath is out of date. " . "Loading stopped.\n"); return $exception; } elsif ($exception->{exception} eq 'nonexistent') { $biuw->{log}->warn( "$feedfullpath does not exist. " . "Loading stopped.\n"); return $exception; } } }
In reply to Re: Initialized Variable getting Uninitialized Warning
by ikegami
in thread Initialized Variable getting Uninitialized Warning
by drw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |