in reply to Re^2: code reference in YAML
in thread code reference in YAML
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: code reference in YAML
by ikegami (Patriarch) on Jan 27, 2011 at 18:53 UTC | |
|
Re^4: code reference in YAML
by GrandFather (Saint) on Jan 27, 2011 at 23:26 UTC |