Permalink
Browse files

add some docs

  • Loading branch information...
1 parent ee68cab commit 1e669158919a0b91177099303455b845a6fc32ec @szabgab committed Aug 9, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 lib/Pod/Parser.pm
View
@@ -13,6 +13,27 @@ Pod::Parser - parsing files with POD in them (Perl 6 syntax)
The generated data structure is not final yet
+ use Pod::Parser;
+ my $pp = Pod::Parser.new;
+ my @data = $pp.parse_file('path/to/file.pod');
+
+or
+
+ my $pod = 'path/to/file.pod'.IO.slurp;
+ my @data = $pp.parse($pod);
+
+=head2 Example
+
+ use Pod::Parser;
+ my $pp = Pod::Parser.new;
+ my @data = $pp.parse_file('path/to/file.pod');
+ CATCH {
+ when X::Pod::Parser {
+ warn $_;
+ return;
+ }
+ }
+
=end pod
my $in_pod = 0;

0 comments on commit 1e66915

Please sign in to comment.