#!/usr/bin/perl use strict; use warnings; use lib qw<blib/arch blib/lib>; use Variable::Magic qw<wizard cast>; use Tie::Hash; my $wiz = wizard copy => sub { print STDERR "COPY $_[2] => $_[3]\n" }, free => sub { print STDERR "FREE\n" }; my %h; tie %h, 'Tie::StdHash'; %h = (a => 1, b => 2); cast %h, $wiz; $h{b} = 3; my $x = delete $h{b}; $x == 3 or die 'incorrect';
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
copy.pl | File | 386 B | 0755 |
|
magic.pl | File | 650 B | 0755 |
|
synopsis.pl | File | 808 B | 0755 |
|
uvar.pl | File | 643 B | 0755 |
|
vm_vs_tie.pl | File | 957 B | 0755 |
|