X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLexical-Types.git;a=blobdiff_plain;f=lib%2FLexical%2FTypes.pm;h=642d2ce1d6937fa3c54c917f08e7e79f62c64551;hp=ae17a75cd15980b6fdf9a532273b8cbab133d9ad;hb=1a019acca86cfa85a067bd85249fa5981f6e13a8;hpb=9cc3a83c895e5be1ac696757e27acfc6b4cecb03 diff --git a/lib/Lexical/Types.pm b/lib/Lexical/Types.pm index ae17a75..642d2ce 100644 --- a/lib/Lexical/Types.pm +++ b/lib/Lexical/Types.pm @@ -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