in reply to Bug in YAML::Any - What to do?

yup, thats a bug, to fix you can put references into array, then local
sub Dump { my @vals ; my @opts ; for my $option (@dump_options) { no strict 'refs'; my $var = \${"$implementation\::$option"}; push @opts, $var; push @vals, defined $value ? $value : ${"YAML::$option"}; } local (@opts) = @vals; return &{"$implementation\::Dump"}(@_); }

Replies are listed 'Best First'.
Re^2: Bug in YAML::Any - What to do?
by ikegami (Patriarch) on Dec 14, 2009 at 23:43 UTC

    That attempts to localise @opts, not the scalars referenced by the elements of @opts.

Re^2: Bug in YAML::Any - What to do?
by Anonymous Monk on Dec 14, 2009 at 23:25 UTC