Skip to content

Commit

Permalink
lib/Module/Build/Base.pm - cleaned-up some tabs, set vim modeline to …
Browse files Browse the repository at this point in the history
…keep them that way

git-svn-id: http://svn.perl.org/modules/Module-Build/trunk@8597 50811bd7-b8ce-0310-adc1-d9db26280581
  • Loading branch information
ewilhelm committed Jan 18, 2007
1 parent 00b3faf commit 5d705e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/Module/Build/Base.pm
Expand Up @@ -1862,29 +1862,29 @@ sub get_action_docs {
$@ = '';
($@ = "No known action '$action'\n"), return
unless $actions->{$action};

my ($files_found, @docs) = (0);
foreach my $class ($self->super_classes) {
(my $file = $class) =~ s{::}{/}g;
$file = $INC{$file . '.pm'} or next;
my $fh = IO::File->new("< $file") or next;
$files_found++;

# Code below modified from /usr/bin/perldoc

# Skip to ACTIONS section
local $_;
while (<$fh>) {
last if /^=head1 ACTIONS\s/;
}

# Look for our action
my ($found, $inlist) = (0, 0);
while (<$fh>) {
if (/^=item\s+\Q$action\E\b/) {
$found = 1;
$found = 1;
} elsif (/^=(item|back)/) {
last if $found > 1 and not $inlist;
last if $found > 1 and not $inlist;
}
next unless $found;
push @docs, $_;
Expand Down Expand Up @@ -4190,3 +4190,5 @@ modify it under the same terms as Perl itself.
perl(1), Module::Build(3)
=cut
# vim:ts=8:sw=2:et:sta:sts=2

0 comments on commit 5d705e3

Please sign in to comment.