Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When a package variable is declared local, it is often assumed that the package variable's contents are duplicated and stored in the local variable. This is not so; the local variable is set to undef, just like any other unitialized uninitialized variable. Consequently, local variables must be initialized. They may be initialized with the contents of the package variable. If they are meant to be uninitialized, they should be explicitly set to undef.

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

DCL04-PL

Low

Probable

Medium

P4

L3

Automated Detection

...

  
ToolDiagnostic
Perl::CriticVariables::RequireInitializationForLocalVars 

Bibliography

  

...

...

 

 
 
 

...