1App::ClusterSSH::Base(3U)ser Contributed Perl DocumentatiAopnp::ClusterSSH::Base(3)
2
3
4

NAME

6       App::ClusterSSH::Base - Base object provding utility functions
7

SYNOPSIS

9           use base qw/ App::ClusterSSH::Base /;
10
11           # in object new method
12           sub new {
13               ( $class, $arg_ref ) = @_;
14               my $self = $class->SUPER::new($arg_ref);
15               return $self;
16           }
17

DESCRIPTION

19       Base object to provide some utility functions on objects - should not
20       be used directly
21

METHODS

23       These extra methods are provided on the object
24
25       $obj = App::ClusterSSH::Base->new({ arg => val, });
26           Creates object.  In higher debug levels the args are printed out.
27
28       $obj->id
29           Return the unique id of the object for use in subclasses, such as
30
31               $info_for{ $self->id } = $info
32
33       $obj->debug_level();
34           Returns current debug level
35
36       $obj->set_debug_level( n )
37           Set debug level to 'n' for all child objects.
38
39       $obj->debug($level, @text)
40           Output @text on STDOUT if $level is the same or lower that
41           debug_level
42
43       $obj->set_lang
44           Set the Locale::Maketext language.  Defaults to 'en'.  Expects the
45           App::ClusterSSH/L10N/{lang}.pm module to exist and contain all
46           relevant translations, else defaults to English.
47
48       $obj->loc('text to translate [_1]')
49           Using the App::ClusterSSH/L10N/{lang}.pm module convert the  given
50           text to appropriate language.  See App::ClusterSSH::L10N for more
51           details.  Essentially a wrapper to maketext in Locale::Maketext
52
53       $obj->stdout_output(@);
54           Output text on STDOUT.
55
56       $ovj->parent;
57           Reutrned the object that is the parent of this one, if it was set
58           when the object was created
59
60       $obj->exit;
61           Stub to allow program to exit neatly from wherever in the code
62
63       $config = $obj->config;
64           Returns whatever configuration object has been set up.  Croaks if
65           set_config hasnt been called
66
67       $obj->set_config($config);
68           Set the config to the given value - croaks if has already been
69           called
70
71       %results = $obj->load_file( filename => '/path/to/file', type =>
72       '(cluster|config}' )
73           Load in the specified file and return a hash, parsing the file
74           depending on wther it is a config file (key = value) or cluster
75           file (key value)
76

AUTHOR

78       Duncan Ferguson, "<duncan_j_ferguson at yahoo.co.uk>"
79
81       Copyright 1999-2016 Duncan Ferguson.
82
83       This program is free software; you can redistribute it and/or modify it
84       under the terms of either: the GNU General Public License as published
85       by the Free Software Foundation; or the Artistic License.
86
87       See http://dev.perl.org/licenses/ for more information.
88
89
90
91perl v5.28.1                      2019-01-31          App::ClusterSSH::Base(3)
Impressum