App-perl-distrolint

 view release on metacpan or  search on metacpan

lib/App/perl/distrolint/Check/Pod.pm  view on Meta::CPAN

            }
         }

         if( ( $command // "" ) eq "=head2" and
             my $meth = $self->can( "check_head2_$last_head1" ) ) {
            $ok &= $meth->( $self, $file, $contentnode );
         }

         if( ( $command // "" ) eq "=for" and $content =~ s/^highlighter// ) {
            $content =~ s/^\s+//;
            my @args = split m/\s+/, $content;
            $args[0] = "language=$args[0]" if @args and $args[0] !~ m/=/;

            $highlighter = "";  # empty string is still defined
            m/^language=(.*)$/ and $highlighter = $1, last
               for @args;
         }

         if( $paratype eq "verbatim_paragraph" ) {
            if( $require_highlighter_directive and !defined $highlighter ) {
               App->note( App->format_file( $file, $contentnode->start_row + 1 ), " verbatim paragraph without highlighter config" );

lib/App/perl/distrolint/Check/Pod.pm  view on Meta::CPAN

   my $last_head2;

   while( @nodes ) {
      my $node = shift @nodes;
      my $type = $node->type;

      my $contentnode = first { $_->type eq "content" } $node->child_nodes;

      if( $type eq "command_paragraph" and $node->child_by_field_name( "command" )->text eq "=head2" ) {
         $last_head2 = $contentnode;
         my $funcname = ( split m/\s+/, $last_head2->text )[0];

         # Having just switched to a new head2 we immediately expect a verbatim paragraph

         # Though it's possible we might have more head2s first to give multiple headings
         while( @nodes and $nodes[0]->type eq "command_paragraph" and
                $nodes[0]->child_by_field_name( "command" )->text eq "=head2" ) {
            shift @nodes;
         }

         $node = shift @nodes;

lib/App/perl/distrolint/CheckRole/EachFile.pm  view on Meta::CPAN

           $3 ? "."     :  # ? becomes .
           $4 ? "\\."   :  # . becomes \.
           quotemeta $5}ge;
   return qr(^$s$);
}

method _run_foreach ( $opts, $method, @args )
{
   my $ok = 1;

   my @skip_patterns = split m/\s+/,
      App::perl::distrolint::Config->check_config( $self, "skip", "" );

   $_ = glob2regexp $_ for @skip_patterns;

   File::Find::find({
      no_chdir => 1,
      preprocess => sub (@names) {
         return sort { $a cmp $b } @names;
      },
      wanted => sub () {



( run in 1.198 second using v1.01-cache-2.11-cpan-f4a522933cf )