| 1 | package PDF::FDF::Simple::Builder; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Module::Build; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use File::Copy "mv"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | @ISA = ("Module::Build"); | |||||||||
| 11 | |||||||||||
| 12 | sub ACTION_grammar | ||||||||||
| 13 | 0 | ▶ | { | ||||||||
|
Subroutine
ACTION_grammar: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 14 | 0 | require Parse::RecDescent; | |||||||||
| 15 | |||||||||||
| 16 | 0 | my $grammar_file ='lib/auto/PDF/FDF/Simple/grammar'; | |||||||||
| 17 | 0 | ▶ | open GRAMMAR_FILE, $grammar_file or die "Cannot open grammar file ".$grammar_file; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 0 | local $/; | |||||||||
| 19 | 0 | my $grammar = <GRAMMAR_FILE>; | |||||||||
| 20 | |||||||||||
| 21 | 0 | Parse::RecDescent->Precompile($grammar, "PDF::FDF::Simple::Grammar"); | |||||||||
| 22 | 0 | my $target = "lib/PDF/FDF/Simple/Grammar.pm"; | |||||||||
| 23 | 0 | mv "Grammar.pm", $target; | |||||||||
| 24 | 0 | print "Updated $target\n"; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | |||||||||||
| 28 | 1 | 1; | |||||||||
| 29 | |||||||||||
| 30 | =pod | ||||||||||
| 31 | |||||||||||
| 32 | =head1 NAME | ||||||||||
| 33 | |||||||||||
| 34 | PDF::FDF::Simple::Builder - Module::Build extensions for PDF::FDF::Simple | ||||||||||
| 35 | |||||||||||
| 36 | =head1 SYNOPSIS | ||||||||||
| 37 | |||||||||||
| 38 | perl Build.PL | ||||||||||
| 39 | ./Build grammar | ||||||||||
| 40 | ./Build | ||||||||||
| 41 | ./Build test | ||||||||||
| 42 | ./Build install | ||||||||||
| 43 | |||||||||||
| 44 | =head1 DESCRIPTION | ||||||||||
| 45 | |||||||||||
| 46 | Provides Module::Build extensions, mainly for precompiling the grammar | ||||||||||
| 47 | file. | ||||||||||
| 48 | |||||||||||
| 49 | =head1 FUNCTIONS | ||||||||||
| 50 | |||||||||||
| 51 | =head2 ACTION_grammar | ||||||||||
| 52 | |||||||||||
| 53 | This defines an Build action C<grammar> which precompiles the grammar | ||||||||||
| 54 | using Parse::RecDescent and moves the file to | ||||||||||
| 55 | lib/PDF/FDF/Simple/Grammar.pm. It is usually done by the maintainer, | ||||||||||
| 56 | before he builds a dist file for CPAN. | ||||||||||
| 57 | |||||||||||
| 58 | =head1 AUTHOR | ||||||||||
| 59 | |||||||||||
| 60 | =over 4 | ||||||||||
| 61 | |||||||||||
| 62 | =item * | ||||||||||
| 63 | |||||||||||
| 64 | Steffen Schwigon <ss5@renormalist.net>, | ||||||||||
| 65 | |||||||||||
| 66 | =back | ||||||||||
| 67 | |||||||||||
| 68 | =cut | ||||||||||