/usr/share/perl5/Config/Model/Role/HelpAsText.pm is in libconfig-model-perl 2.097-2.
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 | #
# This file is part of Config-Model
#
# This software is Copyright (c) 2005-2016 by Dominique Dumont.
#
# This is free software, licensed under:
#
# The GNU Lesser General Public License, Version 2.1, February 1999
#
package Config::Model::Role::HelpAsText;
$Config::Model::Role::HelpAsText::VERSION = '2.097';
# ABSTRACT: Transalet element help from pod to text
use Mouse::Role;
use strict;
use warnings;
use Pod::Text;
use Pod::Simple 3.23;
use 5.10.1;
requires('get_help');
sub get_help_as_text {
my $self = shift;
my $pod = $self->get_help(@_) ;
return undef unless defined $pod;
my $parser = Pod::Text->new(
indent => 0,
nourls => 1,
);
# require Pod::Simple 3.23
$parser->parse_characters('utf8');
my $output = '';
$parser->output_string(\$output);
$parser->parse_string_document("=pod\n\n" . $pod);
$output =~ s/[\n\s]+$//;
return $output;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Config::Model::Role::HelpAsText - Transalet element help from pod to text
=head1 VERSION
version 2.097
=head1 SYNOPSIS
$self->get_help_as_text( ... );
=head1 DESCRIPTION
Role used to transform Config::Model help text or description from pod
to text. The provided method should be used when the help text should
be displayed on STDOUT.
This functionality is provided as a role because the interface to
L<Pod::Text> is not so easy.
=head1 METHODS
=head2 get_help_as_text
Calls C<get_help> and transform the Pod output to text.
=head2 SEE ALSO
L<Pod::Text>, L<Pod::Simple>
=head1 AUTHOR
Dominique Dumont
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2005-2016 by Dominique Dumont.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
=cut
|