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.
Entry.pm in branches/2014/dev_r4650_UKMO12_CFL_diags_take2/NEMOGCM/EXTERNAL/fcm/lib/Fcm/Keyword/Formatter – NEMO

source: branches/2014/dev_r4650_UKMO12_CFL_diags_take2/NEMOGCM/EXTERNAL/fcm/lib/Fcm/Keyword/Formatter/Entry.pm @ 5947

Last change on this file since 5947 was 5947, checked in by timgraham, 8 years ago

Reinstate svn Id keywords before merge

  • Property svn:keywords set to Id
File size: 1.3 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::Keyword::Formatter::Entry;
10
11################################################################################
12# Constructor
13sub new {
14    my ($class) = @_;
15    return bless(\do{my $annon_scalar}, $class);
16}
17
18################################################################################
19# Formats a keyword entry
20sub format {
21    my ($self, $entry) = @_;
22    return sprintf("%s = %s\n", $entry->get_key(), $entry->get_value());
23}
24
251;
26__END__
27
28=head1 NAME
29
30Fcm::Keyword::Formatter::Entry
31
32=head1 SYNOPSIS
33
34    use Fcm::Keyword::Formatter::Entry;
35    $formatter = Fcm::Keyword::Formatter::Entry->new();
36    print($formatter->format($entry));
37
38=head1 DESCRIPTION
39
40An object of this class is used to format a keyword entry.
41
42=head1 METHODS
43
44=over 4
45
46=item new()
47
48Constructor.
49
50=item format($entry)
51
52Returns a simple string representation of $entry.
53
54=back
55
56=head1 SEE ALSO
57
58L<Fcm::Keyword::Entry|Fcm::Keyword::Entry>
59
60=head1 COPYRIGHT
61
62E<169> Crown copyright Met Office. All rights reserved.
63
64=cut
Note: See TracBrowser for help on using the repository browser.