| 1 | package Module::Build::Custom; | ||||||||||
| 2 | 1 | ▶ | use Module::Build; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | our @ISA = qw(Module::Build); | |||||||||
| 4 | |||||||||||
| 5 | sub ACTION_install { | ||||||||||
| 6 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
ACTION_install: not called CC=8 SCAR=38.3
Pod
undocumented
| |||||||||||
| 7 | |||||||||||
| 8 | # Install the files first | ||||||||||
| 9 | 0 | $self->SUPER::ACTION_install; | |||||||||
| 10 | |||||||||||
| 11 | ################################## | ||||||||||
| 12 | # Twiddle with the docs database # | ||||||||||
| 13 | ################################## | ||||||||||
| 14 | |||||||||||
| 15 | 1 | ▶ | use PDL::Doc; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 1 | ▶ | use File::Copy qw(copy); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | # Find the pdl documentation | ||||||||||
| 19 | 0 | my ($dir,$file,$pdldoc); | |||||||||
| 20 | |||||||||||
| 21 | DIRECTORY: | ||||||||||
| 22 | 0 | for my $dir (@INC) { | |||||||||
| 23 | 0 | $file = "$dir/PDL/pdldoc.db"; | |||||||||
| 24 | 0 | ▶ | if (-f $file) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 0 | ▶ | if (not -w "$dir/PDL") { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 0 | die "No write permission at $dir/PDL! Not updating docs database.\n"; | |||||||||
| 27 | } | ||||||||||
| 28 | 0 | print "Found docs database $file\n"; | |||||||||
| 29 | 0 | $pdldoc = new PDL::Doc ($file); | |||||||||
| 30 | 0 | last DIRECTORY; | |||||||||
| 31 | } | ||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | die ("Unable to find docs database! Not updating docs database.\n") unless $pdldoc; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | |||||||||||
| 36 | 0 | for my $basedir(@INC) { | |||||||||
| 37 | 0 | $dir = "$basedir/PDL/Parallel"; | |||||||||
| 38 | 0 | ▶ | if (-d $dir) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | 0 | $pdldoc->ensuredb(); | |||||||||
| 40 | 0 | $pdldoc->scantree($dir); | |||||||||
| 41 | 0 | eval { $pdldoc->savedb(); }; | |||||||||
| 42 | 0 | ▶ | warn $@ if $@; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 43 | |||||||||||
| 44 | 0 | print "PDL docs database updated.\n"; | |||||||||
| 45 | 0 | last; | |||||||||
| 46 | } | ||||||||||
| 47 | } | ||||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 1 | 1; | |||||||||