Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POD & 'no critic' to the created parser file #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion lib/Parse/RecDescent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ sub Precompile
print OUT "#\n",
"# This parser was generated with\n",
"# Parse::RecDescent version $Parse::RecDescent::VERSION\n",
"#\n\n";
"#\n\n",
" ## no critic ()",
"\n";

print STDERR "precompiling grammar from file '$sourcefile'\n",
"to class $class in module file '$modulefile'\n"
Expand Down Expand Up @@ -208,6 +210,45 @@ EOWARNING

print OUT "}";
}
print OUT <<"SIMPLE_POD";


=pod

=head1 NAME

$class - Parse::RecDescent parser

=head1 DESCRIPTION

Parser automagically generated.

my \$string = magical_get_string();
my \$parser = $class->new();
my \$items = \$parser->parse(\$string)
or do { warn("Bad data: \$string\n"); };

=head1 METHODS

=head2 new

Make a new parser object

=head2 parse

Parse the given string

=head1 AUTHOR

autogenerated by $0

=head1 LICENSE

This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.

=cut
SIMPLE_POD

close OUT
or croak("Can't write to new module file '$modulefile'");
Expand Down