/usr/share/perl5/Config/Model/Utils/GenClassPod.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 | #
# 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::Utils::GenClassPod;
$Config::Model::Utils::GenClassPod::VERSION = '2.097';
# ABSTRACT: generate pod documentation from configuration models
use strict;
use warnings;
use 5.010;
use parent qw(Exporter);
our @EXPORT = qw(gen_class_pod);
use Path::Tiny ;
use Config::Model ; # to generate doc
sub gen_class_pod {
my $cm = Config::Model -> new(model_dir => "lib/Config/Model/models") ;
my %done;
my @models = @_ ? @_ :
map { /model\s*=\s*([\w:-]+)/; $1; }
grep { /^\s*model/; }
map { $_->lines; }
map { $_->children; }
path ("lib/Config/Model/")->children(qr/\.d$/);
foreach my $model (@models) {
# %done avoid generating doc several times (generate_doc scan docs for
# classes referenced by the model with config_class_name parameter)
print "Checking doc for model $model\n";
$cm->load($model) ;
$cm->generate_doc ($model,'lib', \%done) ;
}
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Config::Model::Utils::GenClassPod - generate pod documentation from configuration models
=head1 VERSION
version 2.097
=head1 SYNOPSIS
use Config::Model::Utils::GenClassPod;
gen_class_pod;
# or
gen_class_pod('Foo','Bar',...)
=head1 DESCRIPTION
This module provides a single exported function: C<gen_class_pod>.
This function scans C<./lib/Config/Model/models/*.d>
and generate pod documentation for each file found there using
L<Config::Model::generate_doc|Config::Model/"generate_doc ( top_class_name , directory , [ \%done ] )">
You can also pass one or more class names. C<gen_class_pod> writes
the documentation for each passed class and all other classes used by
the passed classes.
=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
|