/usr/share/perl5/Config/Model/Role/NodeLoader.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 | #
# 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::NodeLoader;
$Config::Model::Role::NodeLoader::VERSION = '2.097';
# ABSTRACT: Load Node element in configuration tree
use Mouse::Role;
use strict;
use warnings;
use Mouse::Util;
use Log::Log4perl qw(get_logger :levels);
my $load_logger = get_logger("TreeLoad");
sub load_node {
my ($self, %params) = @_ ;
my $config_class_name = $params{config_class_name};
my $config_class = $self->config_model->get_model($config_class_name) ;
my $node_class = $config_class->{class} || 'Config::Model::Node';
$load_logger->info("Loading $config_class_name ". $self->location . " with $node_class");
Mouse::Util::load_class($node_class);
return $node_class->new(%params) ;
}
__END__
=pod
=encoding UTF-8
=head1 NAME
Config::Model::Role::NodeLoader - Load Node element in configuration tree
=head1 VERSION
version 2.097
=head1 SYNOPSIS
$self->load_node( config_class_name => "...", %other_args);
=head1 DESCRIPTION
Role used to load a node element using L<Config::Model::Node> (default behavior).
If the config class overrides the default implementation, ( C<class> parameter ), the
override class is loaded and used to create the node.
=head1 METHODS
=head2 load_node
Creates a node object using all the named parameters passed to load_node. One of these
parameter must be C<config_class_name>
=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
|