Skip to content

Commit

Permalink
throw exception if ppi fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Nov 29, 2009
1 parent a64125a commit f5621fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Changes
@@ -0,0 +1,7 @@
Revision history for {{$dist->name}}

{{$NEXT}}
throw exception if PPI parsing fails

0.093020 2009-10-28
first release
1 change: 1 addition & 0 deletions lib/Pod/Elemental/PerlMunger.pm
Expand Up @@ -47,6 +47,7 @@ around munge_perl_string => sub {
my ($orig, $self, $perl, $arg) = @_;

my $ppi_document = PPI::Document->new(\$perl);
confess(PPI::Document->errstr) unless $ppi_document;

my @pod_tokens = map {"$_"} @{ $ppi_document->find('PPI::Token::Pod') || [] };
$ppi_document->prune('PPI::Token::Pod');
Expand Down

0 comments on commit f5621fb

Please sign in to comment.