| 1 | package Module::Install::Pod::Inherit; | ||
| 2 | # I haven't tested this code this far back, but I know of know reason that it shouldn't work. | ||
| 3 | # It won't work on anything older, because I use 'our'. | ||
| 4 | use 5.008_000; | ||
| 5 | use warnings; | ||
| 6 | use strict; | ||
| 7 | use Pod::Inherit; | ||
| 8 | use base 'Module::Install::Base'; | ||
| 9 | our $VERSION = '0.01'; | ||
| 10 | |||
| 11 | |||
| 12 | sub PodInherit { | ||
| 13 | my ($self) = @_; | ||
| 14 | |||
| 15 | # Note to self: Careful of your \t vs ' ' | ||
| 16 | $self->postamble(<<"EOPOST"); | ||
| 17 | # Can't do this, because there's nothing in the "make dist" chain that's a double-colon rule. | ||
| 18 | # In make, you need extendable rules to be *explicitly* extendable. | ||
| 19 | # distdir :: podinherit_lib | ||
| 20 | |||
| 21 | pure_all :: podinherit_blib | ||
| 22 | |||
| 23 | # Originally we depended on pure_all here, but that makes it run *after* manifypods, which is Not Good. | ||
| 24 | podinherit_blib : pm_to_blib | ||
| 25 | \$(PERLRUN) -I\$(INST_LIB) -MPod::Inherit -e'Pod::Inherit->new({input_files=>"blib/", force_permissions=>1})->write_pod' | ||
| 26 | |||
| 27 | EOPOST | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | =head1 NAME | ||
| 32 | |||
| 33 | Module::Install::Pod::Inherit - Make your distribution's POD link to where inherited methods come from, the easy way (if you use M::I). | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | use Module::Install::Pod::Inherit | ||
| 38 | |||
| 39 | PodInherit(); | ||
| 40 | |||
| 41 | WriteAll; | ||
| 42 | |||
| 43 | =head1 DESCRIPTION | ||
| 44 | |||
| 45 | One problem with modern perl code with fairly deep, or complex, | ||
| 46 | inheritence trees is that users don't know where to look for | ||
| 47 | documentation; they think they have a Foo::Bar object, and don't know | ||
| 48 | to look fo the docs in | ||
| 49 | Foo::Bar::Role::Server::Cute::Uniform::Red::Hair. L<Pod::Inherit> was | ||
| 50 | written to fix that. This module is a small wrapper around | ||
| 51 | L<Pod::Inherit> to make it easy to use, at least for distributions | ||
| 52 | based around L<Module::Install>. It also forces the author of | ||
| 53 | Module::Install::Pod::Inherit to worry about how to make it work best, | ||
| 54 | rather then you, who just wants to have docs that are easy to understand. | ||
| 55 | |||
| 56 | =head1 BUGS | ||
| 57 | |||
| 58 | Should run across lib during "make dist" time, but I can't figure out how to do that. | ||
| 59 | |||
| 60 | Probably more lurking. | ||
| 61 | |||
| 62 | =head2 LICENSE | ||
| 63 | |||
| 64 | Copyright 2009, James Mastros, AKA theorbtwo. Released under the same | ||
| 65 | terms as Perl itself. It is based upon | ||
| 66 | Module-Install-DBICx-AutoDoc-0.03, copyright 2008, Jason M. Mills | ||
| 67 | (under the same license). |