Codebase list libdist-zilla-plugin-ourpkgversion-perl / 85e229f
don't die just because an invalid file, skip and continue Signed-off-by: Caleb Cushing <xenoterracide@gmail.com> Caleb Cushing 12 years ago
1 changed file(s) with 7 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
11 use 5.008;
22 use strict;
33 use warnings;
4 BEGIN {
5 # VERSION
6 }
4
5 # VERSION
6
77 use Moose;
88 with (
99 'Dist::Zilla::Role::FileMunger',
3535 my $content = $file->content;
3636
3737 my $doc = PPI::Document->new(\$content)
38 or croak( 'Error parsing "'
38 or $self->log( 'Skipping: "'
3939 . $file->name
40 . '" with PPI: '
40 . '" error with PPI: '
4141 . PPI::Document->errstr
4242 )
4343 ;
44
45 return unless defined $doc;
4446
4547 my $comments = $doc->find('PPI::Token::Comment');
4648