]> git.vpit.fr Git - perl/modules/Lexical-Types.git/blobdiff - lib/Lexical/Types.pm
POD verbatim paragraphs should fit into a terminal
[perl/modules/Lexical-Types.git] / lib / Lexical / Types.pm
index 4bffba8c828a54b78097a238a61ae90e2ecc1b77..a3b285af561977209e7b55048f89c2f578e81476 100644 (file)
@@ -11,13 +11,13 @@ Lexical::Types - Extend the semantics of typed lexicals.
 
 =head1 VERSION
 
-Version 0.09
+Version 0.12
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.09';
+ $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<import>
 
-Magically called when writing C<use Lexical::Types>.
+    use Lexical::Types;
+    use Lexical::Types as => $prefix;
+    use Lexical::Types as => sub { ... }; # = $mangler
+
+Magically called when C<use Lexical::Types> is encountered.
 All the occurences of C<my Str $x> 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'> :
 
@@ -110,7 +114,9 @@ If the value given is a code reference C<$mangler>, it will be called at compile
 
 either an empty list, in which case the current typed lexical definition will be skipped (thus it won't be altered to trigger a run-time hook) ;
 
-    use Lexical::Types as => sub { return $_[0] =~ /Str/ ? @_ : () };
+    use Lexical::Types as => sub {
+     return $_[0] =~ /Str/ ? @_ : ()
+    };
     my Str $y; # calls Str->TYPEDSCALAR
     my Int $x; # nothing special
 
@@ -165,7 +171,9 @@ sub import {
 
 =head2 C<unimport>
 
-Magically called when writing C<no Lexical::Types>.
+    no Lexical::Types;
+
+Magically called when C<no Lexical::Types> is encountered.
 Turns the pragma off.
 
 =cut
@@ -289,7 +297,8 @@ You can contact me by mail or on C<irc.perl.org> (vincent).
 
 =head1 BUGS
 
-Please report any bugs or feature requests to C<bug-lexical-types at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lexical-Types>.  I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
+Please report any bugs or feature requests to C<bug-lexical-types at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lexical-Types>.
+I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
 
 =head1 SUPPORT