In particular, it can be used to automatically tie or bless typed lexicals.
It is B<not> implemented with a source filter.
In particular, it can be used to automatically tie or bless typed lexicals.
It is B<not> implemented with a source filter.
=head2 C<< import [ as => [ $prefix | $mangler ] ] >>
Magically called when writing C<use Lexical::Types>.
=head2 C<< import [ as => [ $prefix | $mangler ] ] >>
Magically called when writing C<use Lexical::Types>.
You can either edit C<$_[1]> in place, in which case you should return an empty list, or return a new scalar that will be copied into C<$x>.
=cut
You can either edit C<$_[1]> in place, in which case you should return an empty list, or return a new scalar that will be copied into C<$x>.
=cut
-For C<perl> to be able to parse C<my Foo $x>, the package C<Foo> must be defined somewhere, and this even if you use the C<as> option to redirect to another package.
+For C<perl> to be able to parse C<my Str $x>, the package C<Str> must be defined somewhere, and this even if you use the C<as> option to redirect to another package.
It's unlikely to find a workaround, as this happens deep inside the lexer, far from the reach of an extension.
Only one mangler or prefix can be in use at the same time in a given scope.
It's unlikely to find a workaround, as this happens deep inside the lexer, far from the reach of an extension.
Only one mangler or prefix can be in use at the same time in a given scope.