/usr/share/perl5/Pod/Weaver/Section/Authors.pm is in libpod-weaver-perl 4.015-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | package Pod::Weaver::Section::Authors;
# ABSTRACT: a section listing authors
$Pod::Weaver::Section::Authors::VERSION = '4.015';
use Moose;
with 'Pod::Weaver::Role::Section';
use Pod::Elemental::Element::Nested;
use Pod::Elemental::Element::Pod5::Verbatim;
#pod =head1 OVERVIEW
#pod
#pod This section adds a listing of the documents authors. It expects a C<authors>
#pod input parameter to be an arrayref of strings. If no C<authors> parameter is
#pod given, it will do nothing. Otherwise, it produces a hunk like this:
#pod
#pod =head1 AUTHORS
#pod
#pod Author One <a1@example.com>
#pod Author Two <a2@example.com>
#pod
#pod =attr header
#pod
#pod The title of the header to be added.
#pod (default: "AUTHOR" or "AUTHORS")
#pod
#pod =cut
has header => (
is => 'ro',
isa => 'Maybe[Str]',
);
sub weave_section {
my ($self, $document, $input) = @_;
return unless $input->{authors};
my $multiple_authors = @{ $input->{authors} } > 1;
# I think I might like to have header be a callback or something, so that you
# can get pluralization for your own custom header. -- rjbs, 2015-03-17
my $name = $self->header || ($multiple_authors ? 'AUTHORS' : 'AUTHOR');
$self->log_debug("adding $name section");
$self->log_debug("author = $_") for @{ $input->{authors} };
my $authors = [ map {
Pod::Elemental::Element::Pod5::Ordinary->new({
content => $_,
}),
} @{ $input->{authors} } ];
$authors = [
Pod::Elemental::Element::Pod5::Command->new({
command => 'over', content => '4',
}),
( map {
Pod::Elemental::Element::Pod5::Command->new({
command => 'item', content => '*',
}),
$_,
} @$authors ),
Pod::Elemental::Element::Pod5::Command->new({
command => 'back', content => '',
}),
] if $multiple_authors;
push @{$document->children },
Pod::Elemental::Element::Nested->new({
type => 'command',
command => 'head1',
content => $name,
children => $authors,
});
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Pod::Weaver::Section::Authors - a section listing authors
=head1 VERSION
version 4.015
=head1 OVERVIEW
This section adds a listing of the documents authors. It expects a C<authors>
input parameter to be an arrayref of strings. If no C<authors> parameter is
given, it will do nothing. Otherwise, it produces a hunk like this:
=head1 AUTHORS
Author One <a1@example.com>
Author Two <a2@example.com>
=head1 ATTRIBUTES
=head2 header
The title of the header to be added.
(default: "AUTHOR" or "AUTHORS")
=head1 AUTHOR
Ricardo SIGNES <rjbs@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
|