The old check evaluates the expression before determining whether the resulting value is defined. However, when the expression refers to a subroutine, it gets executed; if the subroutine doesn't protect against missing parameters, it'll cause executions with bad input, i.e., the Striker->generate_manifest subroutine without parameters. The new check uses can(), which correctly determines whether the key "exists" on the blessed object; although it doesn't strictly mean "exists", but it does the job.main
parent
ee259f5a3a
commit
7845f8c170
1 changed files with 6 additions and 5 deletions
Loading…
Reference in new issue