X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FUpper.pm;h=6128a8f10dd0fb906ca2663fa89215acffbd584b;hb=ded0c62307dd417bbd7390457692310aca67ea93;hp=083536422eba2dc3e1dc565041384cdcfff6dae3;hpb=65980d1bb9eb9b7e32cf80df50a4b52f1924dc3b;p=perl%2Fmodules%2FScope-Upper.git diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index 0835364..6128a8f 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -87,15 +87,16 @@ For example, if C<$value> is a scalar reference, then the C slot of the =item * -A string beginning with a sigil, representing the symbol to localize and assign to. -If the sigil is C<'$'>, then C<$value> isn't dereferenced, that is +A string beginning with a sigil, representing the symbol to localize and to assign to. +If the sigil is C<'$'>, L follows the same syntax as C, i.e. C<$value> isn't dereferenced. +For example, localize '$x', \'foo' => 0; will set C<$x> to a reference to the string C<'foo'>. -Other sigils behave as if a glob was passed. +Other sigils (C<'@'>, C<'%'>, C<'&'> and C<'*'>) require C<$value> to be a reference of the corresponding type. -The symbol is resolved when the actual localization takes place and not when C is called. +When the symbol is given by a string, it is resolved when the actual localization takes place and not when C is called. This means that sub tag { localize '$x', $_[0] => 1; }