X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLexical%2FTypes.pm;h=d97761b42b32272846695f77293d15cb5c95f4d2;hb=99dd805ff2026836a638c45fed6ecd4d4d483833;hp=dcfd0e03569e36e930bea6361e75b5ac43eb15eb;hpb=27448f68875d0f4bd02914e437eb8c3d91390732;p=perl%2Fmodules%2FLexical-Types.git diff --git a/lib/Lexical/Types.pm b/lib/Lexical/Types.pm index dcfd0e0..d97761b 100644 --- a/lib/Lexical/Types.pm +++ b/lib/Lexical/Types.pm @@ -13,13 +13,13 @@ Lexical::Types - Extend the semantics of typed lexicals. =head1 VERSION -Version 0.01 +Version 0.02 =cut our $VERSION; BEGIN { - $VERSION = '0.01'; + $VERSION = '0.02'; } =head1 SYNOPSIS @@ -54,7 +54,7 @@ BEGIN { Magically called when writing C. All the occurences of C in the current lexical scope will be changed to call at each run a given method in a given package. -The method and package are determined by the parameter C : +The method and package are determined by the parameter C<'as'> : =over 4 @@ -165,8 +165,21 @@ You can integrate L in your module so that using it will provide =head1 CAVEATS -For C to be able to parse C, the package C must be defined somewhere, and this even if you use the C 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. +For C to be able to parse C, you need : + +=over 4 + +=item * + +either the C package to be defined ; + +=item * + +or for C to be a constant sub returning a valid defined package. + +=back + +Those restrictions apply even if you use the C<'as'> option to redirect to another package, and are 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. @@ -202,6 +215,8 @@ Tests code coverage report is available at L