Subject: | used only once warnings |
Show quoted text
----- BEGIN CODE -----
use strict;
use warnings;
use YAML qw( );
local $YAML::UseCode = 1;
my $s = YAML::Load(<<'__EOI__');
---
- !!perl/code |
{
print "Hello World\n";
}
__EOI__
$s->[0]->();
----- END CODE -----
----- BEGIN OUTPUT -----
Name "YAML::UseCode" used only once: possible typo at x.pl line 6.
Hello World
----- END OUTPUT -----
That warning is spurious. Please add the following to YAML to silence it:
----- BEGIN CODE -----
use vars qw( $UseCode );
----- END CODE -----
The same applies to the other global config variables.