Update: Both solutions below are better. I didn't think of how ugly "local ... if ...;" was.
If you want to make the warning go away without disabling warnings, you could reference the variable twice, like so:
local $YAML::UseCode = 1 if ! defined $YAML::UseCode;
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: code reference in YAML
by roboticus
in thread code reference in YAML
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |