Subject: | POD has LAZY_UNTIE arg order wrong |
Hi,
In both places in the POD where you give the order of args for
LAZY_UNTIE you have the variable ref before the coderef:
# magic untie - slow on (broken) Perl 5.8.0
tie $variable, 'Data::Lazy' => \$variable, sub { ... };
tie $var, 'Data::Lazy', \$var, "sleep 1; 1";
... both of which fail with:
Not a SCALAR reference at /usr/local/share/perl/5.10.0/Data/Lazy.pm
line 66.
The actual order expected by Lazy.pl (and used by t/04-untie.t) is the
other way around:
tie $foo, 'Data::Lazy', sub { "value".($c++) }, \$foo;