X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FVariable%2FMagic.pm;h=19ba55f68748ffaadf2620854187de321e629f15;hb=refs%2Ftags%2Fv0.28;hp=70dff80801e7c27f31e022c022b759b4c475042d;hpb=c475e1988f3033a818329f04d2e86acbc3c53632;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index 70dff80..19ba55f 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -13,13 +13,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl. =head1 VERSION -Version 0.27 +Version 0.28 =cut our $VERSION; BEGIN { - $VERSION = '0.27'; + $VERSION = '0.28'; } =head1 SYNOPSIS @@ -278,19 +278,20 @@ BEGIN { =head2 C - wizard sig => ..., - data => sub { ... }, - get => sub { my ($ref, $data) = @_; ... }, - set => sub { my ($ref, $data) = @_; ... }, - len => sub { my ($ref, $data, $len) = @_; ... ; return $newlen; }, - clear => sub { my ($ref, $data) = @_; ... }, - free => sub { my ($ref, $data) = @_, ... }, - copy => sub { my ($ref, $data, $key, $elt) = @_; ... }, - local => sub { my ($ref, $data) = @_; ... }, - fetch => sub { my ($ref, $data, $key) = @_; ... }, - store => sub { my ($ref, $data, $key) = @_; ... }, - exists => sub { my ($ref, $data, $key) = @_; ... }, - delete => sub { my ($ref, $data, $key) = @_; ... } + wizard sig => ..., + data => sub { ... }, + get => sub { my ($ref, $data) = @_; ... }, + set => sub { my ($ref, $data) = @_; ... }, + len => sub { my ($ref, $data, $len) = @_; ... ; return $newlen; }, + clear => sub { my ($ref, $data) = @_; ... }, + free => sub { my ($ref, $data) = @_, ... }, + copy => sub { my ($ref, $data, $key, $elt) = @_; ... }, + local => sub { my ($ref, $data) = @_; ... }, + fetch => sub { my ($ref, $data, $key) = @_; ... }, + store => sub { my ($ref, $data, $key) = @_; ... }, + exists => sub { my ($ref, $data, $key) = @_; ... }, + delete => sub { my ($ref, $data, $key) = @_; ... }, + copy_key => $bool This function creates a 'wizard', an opaque type that holds the magic information. It takes a list of keys / values as argument, whose keys can be : @@ -461,8 +462,6 @@ The only way to address this would be to return a reference. If you define a wizard with a C callback and cast it on itself, this destructor won't be called because the wizard will be destroyed first. -Using simultaneously C and C magics on hashes may cause segfaults. - =head1 DEPENDENCIES L 5.7.3.