New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
ExtractConfigComparator.pm in branches/UKMO/dev_r10171_test_crs_AMM7/NEMOGCM/EXTERNAL/fcm/lib/Fcm/CLI/Invoker – NEMO

source: branches/UKMO/dev_r10171_test_crs_AMM7/NEMOGCM/EXTERNAL/fcm/lib/Fcm/CLI/Invoker/ExtractConfigComparator.pm @ 10207

Last change on this file since 10207 was 10207, checked in by cmao, 5 years ago

remove svn keyword

File size: 2.1 KB
Line 
1# ------------------------------------------------------------------------------
2# (C) Crown copyright Met Office. All rights reserved.
3# For further details please refer to the file COPYRIGHT.txt
4# which you should have received as part of this distribution.
5# ------------------------------------------------------------------------------
6use strict;
7use warnings;
8
9package Fcm::CLI::Invoker::ExtractConfigComparator;
10use base qw{Fcm::CLI::Invoker};
11
12use Cwd qw{cwd};
13use Fcm::ExtractConfigComparator;
14use Fcm::Config;
15
16################################################################################
17# Invokes the sub-system
18sub invoke {
19    my ($self) = @_;
20    my ($cfg_file1, $cfg_file2) = $self->get_arguments();
21    if (exists($self->get_options()->{verbose})) {
22        Fcm::Config->instance()->verbose($self->get_options()->{verbose});
23    }
24
25    my $system = Fcm::ExtractConfigComparator->new({
26        files => [$cfg_file1, $cfg_file2], wiki => $self->get_options()->{wiki},
27    });
28    $system->invoke();
29}
30
311;
32__END__
33
34=head1 NAME
35
36Fcm::CLI::ExtractInvoker
37
38=head1 SYNOPSIS
39
40    use Fcm::CLI::Invoker::ExtractConfigComparator;
41    $invoker = Fcm::CLI::Invoker::ExtractConfigComparator->new({
42        command   => $command,
43        options   => \%options,
44        arguments => $arguments,
45    });
46    $invoker->invoke();
47
48=head1 DESCRIPTION
49
50This class extends L<Fcm::CLI::Invoker|Fcm::CLI::Invoker> an inherits all its
51methods. An object of this class is used to invoke the extract configuration
52comparator.
53
54=head1 METHODS
55
56See L<Fcm::CLI::Invoker|Fcm::CLI::Invoker> for a list of inherited methods.
57
58=over 4
59
60=item invoke()
61
62Invokes the extract configuration comparator.
63
64The I<wiki> option is mapped directly to that of the constructor of
65L<Fcm::ExtractConfigComparator|Fcm::ExtractConfigComparator> object.
66
67=back
68
69=head1 TO DO
70
71Unit tests.
72
73=head1 SEE ALSO
74
75L<Fcm::ExtractConfigComparator|Fcm::ExtractConfigComparator>,
76L<Fcm::CLI::Invoker|Fcm::CLI::Invoker>,
77L<Fcm::CLI::Subcommand|Fcm::CLI::Subcommand>
78
79=head1 COPYRIGHT
80
81E<169> Crown copyright Met Office. All rights reserved.
82
83=cut
Note: See TracBrowser for help on using the repository browser.