This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
POD nits on B::Lint
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 20 Dec 2005 14:54:10 +0000 (14:54 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 20 Dec 2005 14:54:10 +0000 (14:54 +0000)
p4raw-id: //depot/perl@26421

ext/B/B/Lint.pm

index 253044d..58015b9 100644 (file)
@@ -124,30 +124,29 @@ include other package names whose subs are then checked by Lint.
 
 Lint can be extended by registering plugins.
 
-The C<B::Lint->register_plugin( MyPlugin => \ @new_checks ) method
+The C<< B::Lint->register_plugin( MyPlugin => \@new_checks ) >> method
 adds the class C<MyPlugin> to the list of plugins. It also adds the
 list of C<@new_checks> to the list of valid checks.
 
-You must create a C<match( \ %checks )> method in your plugin class or
-one of its inheritence parents. It will be called on every op as a
-regular method call with a hash ref of checks as its parameter.
+You must create a C<match( \%checks )> method in your plugin class or one
+of its parents. It will be called on every op as a regular method call
+with a hash ref of checks as its parameter.
 
-You may not alter the check hash reference.
+You may not alter the %checks hash reference.
 
-The class methods C<B::Lint->file> and C<B::Lint->line> contain the
-current filename and line number.
+The class methods C<< B::Lint->file >> and C<< B::Lint->line >> contain
+the current filename and line number.
 
- package Sample;
- use B::Lint;
- B::Lint->register_plugin( Sample => [ 'good_taste' ] );
- sub match {
-     my ( $op, $checks_href ) = shift;
-
-     if ( $checks_href->{good_taste} ) {
-         ...
-     }
- }
+  package Sample;
+  use B::Lint;
+  B::Lint->register_plugin( Sample => [ 'good_taste' ] );
+  
+  sub match {
+      my ( $op, $checks_href ) = shift;
+      if ( $checks_href->{good_taste} ) {
+          ...
+      }
+  }
 
 =head1 BUGS
 
@@ -226,6 +225,7 @@ sub B::OP::lint {
     $m = $_->can('match'), $op->$m( \ %check ) for @plugins;
     return;
 }
+
 *$_ = *B::OP::lint
   for \ ( *B::PADOP::lint,
           *B::LOGOP::lint,
@@ -456,13 +456,13 @@ sub compile {
        }
     }
     # Remaining arguments are things to check
-    
+
     return \&do_lint;
 }
 
 sub register_plugin {
     my ( undef, $plugin, $new_checks ) = @_;
-    
+
     # Register the plugin
     for my $check ( @$new_checks ) {
         defined $check
@@ -471,12 +471,12 @@ sub register_plugin {
           or warn "$check is already registered as a B::Lint feature.";
         not $plugin_valid_check{ $check }
           or warn "$check is already registered as a $plugin_valid_check{$check} feature.";
-         
+
         $plugin_valid_check{$check} = $plugin;
     }
-    
+
     push @plugins, $plugin;
-    
+
     return;
 }