X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLexical%2FTypes.pm;h=642d2ce1d6937fa3c54c917f08e7e79f62c64551;hb=1a019acca86cfa85a067bd85249fa5981f6e13a8;hp=ce3a076771aa1e7e92bad8325ee9d6b6f1fff38c;hpb=ca4e18860e8ac0d9754f933838673af82ca02b27;p=perl%2Fmodules%2FLexical-Types.git diff --git a/lib/Lexical/Types.pm b/lib/Lexical/Types.pm index ce3a076..642d2ce 100644 --- a/lib/Lexical/Types.pm +++ b/lib/Lexical/Types.pm @@ -11,13 +11,13 @@ Lexical::Types - Extend the semantics of typed lexicals. =head1 VERSION -Version 0.10 +Version 0.12 =cut our $VERSION; BEGIN { - $VERSION = '0.10'; + $VERSION = '0.12'; } =head1 SYNOPSIS @@ -76,11 +76,15 @@ BEGIN { XSLoader::load(__PACKAGE__, $VERSION); } -=head1 FUNCTIONS +=head1 METHODS -=head2 C<< import [ as => [ $prefix | $mangler ] ] >> +=head2 C -Magically called when writing C. + use Lexical::Types; + use Lexical::Types as => $prefix; + use Lexical::Types as => sub { ... }; # = $mangler + +Magically called when C is encountered. 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<'as'> : @@ -165,7 +169,9 @@ sub import { =head2 C -Magically called when writing C. + no Lexical::Types; + +Magically called when C is encountered. Turns the pragma off. =cut