use YAML::XS;
local $YAML::XS::DumpCode=1;
...
Name "YAML::XS::DumpCode" used only once: possible typo at ..
Well, I know I can suppress this specific warning, but it's kind'a ugly. Am I doing anything wrong? I'm not used to be warned :)
use YAML::XS;
local $YAML::XS::DumpCode=1;
...
Name "YAML::XS::DumpCode" used only once: possible typo at ..
Well, I know I can suppress this specific warning, but it's kind'a ugly. Am I doing anything wrong? I'm not used to be warned :)
There is no global variable declared with the name $YAML::XS::DumpCode
. This configuration is in the YAML
class, so you should set it with local $YAML::DumpCode = 1;
: see the documentation.
It seems like $YAML::XS::DumpCode
is only used from C code, and it is never initialized in YAML/XS.pm
(it is there, but commented out). So that might be a bug to submit against that module.
In the mean time, no warnings 'once';
should do the trick.