From: Vincent Pit Date: Tue, 17 Feb 2009 23:31:55 +0000 (+0100) Subject: 'assignation' is really 'assignment' X-Git-Tag: v0.31~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=8220f08963cc06d7e01c0d38c73f0724ed75e339;p=perl%2Fmodules%2FVariable-Magic.git 'assignation' is really 'assignment' --- diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index 50ada38..b79bf8e 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -36,7 +36,7 @@ BEGIN { =head1 DESCRIPTION Magic is Perl way of enhancing objects. -This mechanism lets the user add extra data to any variable and hook syntaxical operations (such as access, assignation or destruction) that can be applied to it. +This mechanism lets the user add extra data to any variable and hook syntaxical operations (such as access, assignment or destruction) that can be applied to it. With this module, you can add your own magic to any variable without having to write a single line of XS. You'll realize that these magic variables look a lot like tied variables. @@ -49,7 +49,7 @@ Still, the magic made available by this module differs from tieing and overloadi =item * -It isn't copied on assignation. +It isn't copied on assignment. You attach it to variables, not values (as for blessed references). @@ -103,7 +103,7 @@ This one is triggered each time the value of the variable changes (includes arra C This magic is a little special : it is called when the 'size' or the 'length' of the variable has to be known by Perl. -Typically, it's the magic involved when an array is evaluated in scalar context, but also on array assignation and loops (C, C or C). +Typically, it's the magic involved when an array is evaluated in scalar context, but also on array assignment and loops (C, C or C). The callback has then to return the length as an integer. =item * @@ -502,7 +502,7 @@ $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; =head1 CAVEATS -If you store a magic object in the private data slot, the magic won't be accessible by L since it's not copied by assignation. +If you store a magic object in the private data slot, the magic won't be accessible by L since it's not copied by assignment. 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.