X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FVariable%2FMagic.pm;h=5f268a44b951fd6f5c2d280c536e4a9fe9438971;hb=20763a0bc2e3d1987ead055b78ef2481aa18514c;hp=52425fb565e5fa04f8da3fa9ec9c20560d14e99f;hpb=02e289e2e1b107db4724acff320219f108beb6a5;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index 52425fb..5f268a4 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -339,12 +339,12 @@ However, only the return value of the C callback currently holds a meaning. sub wizard { croak 'Wrong number of arguments for wizard()' if @_ % 2; my %opts = @_; - my @cbs = qw/sig data get set len clear free/; - push @cbs, 'copy' if MGf_COPY; - push @cbs, 'dup' if MGf_DUP; - push @cbs, 'local' if MGf_LOCAL; - push @cbs, qw/fetch store exists delete/ if VMG_UVAR; - my $ret = eval { _wizard(map $opts{$_}, @cbs) }; + my @keys = qw/sig data get set len clear free/; + push @keys, 'copy' if MGf_COPY; + push @keys, 'dup' if MGf_DUP; + push @keys, 'local' if MGf_LOCAL; + push @keys, qw/fetch store exists delete copy_key/ if VMG_UVAR; + my $ret = eval { _wizard(map $opts{$_}, @keys) }; if (my $err = $@) { $err =~ s/\sat\s+.*?\n//; croak $err;