1#!/usr/bin/perl -w 2 3# Copyright 2009, 2010, 2011, 2014 Kevin Ryde 4 5# This file is part of Perl-Critic-Pulp. 6# 7# Perl-Critic-Pulp is free software; you can redistribute it and/or 8# modify it under the terms of the GNU General Public License as published 9# by the Free Software Foundation; either version 3, or (at your option) any 10# later version. 11# 12# Perl-Critic-Pulp is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 15# Public License for more details. 16# 17# You should have received a copy of the GNU General Public License along 18# with Perl-Critic-Pulp. If not, see <http://www.gnu.org/licenses/>. 19 20 21# various 22# some DB<1> debugger prompts 23 24use 5.005; 25use strict; 26use warnings; 27use Perl6::Slurp; 28 29use lib::abs '.'; 30use MyLocatePerl; 31use MyStuff; 32 33my $verbose = 0; 34 35my $l = MyLocatePerl->new (include_pod => 1); 36while (my ($filename, $str) = $l->next) { 37 if ($verbose) { print "look at $filename\n"; } 38 39 if ($str =~ /^__END__/m) { 40 substr ($str, $-[0], length($str), ''); 41 } 42 43 my $parser = MyParser->new; 44 $parser->errorsub(sub{1}); # no error prints 45 $parser->parse_from_string ($str, $filename); 46} 47 48package MyParser; 49use strict; 50use warnings; 51use base 'Pod::Parser'; 52 53sub parse_from_string { 54 my ($self, $str, $filename) = @_; 55 56 require IO::String; 57 my $fh = IO::String->new ($str); 58 $self->{_INFILE} = $filename; 59 return $self->parse_from_filehandle ($fh); 60} 61sub command { 62 return ''; 63} 64sub verbatim { 65 my ($self, $text, $linenum, $paraobj) = @_; 66 ### verbatim 67 68 while ($text =~ /([IBCLFSXZ]<)/g) { 69 my $markup = $1; 70 my $filename = $self->{_INFILE}; 71 print "$filename:$linenum:1: markup in verbatim: $markup\n"; 72 } 73} 74sub textblock { 75 my ($self, $text, $linenum, $paraobj) = @_; 76 return ''; 77} 78 79exit 0; 80