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

SYNOPSIS

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

DESCRIPTION

16       Base object to provide some utility functions on objects - should not
17       be used directly
18

METHODS

20       These extra methods are provided on the object
21
22       $obj = App::ClusterSSH::Base->new({ arg => val, });
23           Creates object.  In higher debug levels the args are printed out.
24
25       $obj->id
26           Return the unique id of the object for use in subclasses, such as
27
28               $info_for{ $self->id } = $info
29
30       $obj->debug_level();
31           Returns current debug level
32
33       $obj->set_debug_level( n )
34           Set debug level to 'n' for all child objects.
35
36       $obj->debug($level, @text)
37           Output @text on STDOUT if $level is the same or lower that
38           debug_level
39
40       $obj->set_lang
41           Set the Locale::Maketext language.  Defaults to 'en'.  Expects the
42           App::ClusterSSH/L10N/{lang}.pm module to exist and contain all
43           relevant translations, else defaults to English.
44
45       $obj->loc('text to translate [_1]')
46           Using the App::ClusterSSH/L10N/{lang}.pm module convert the  given
47           text to appropriate language.  See App::ClusterSSH::L10N for more
48           details.  Essentially a wrapper to maketext in Locale::Maketext
49
50       $obj->stdout_output(@);
51           Output text on STDOUT.
52
53       $obj->parent;
54           Returned the object that is the parent of this one, if it was set
55           when the object was created
56
57       %obj->options;
58           Accessor to configured options, if it is set up by this point
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       $sort = $obj->sort
72           Code reference used to sort lists; if configured (and installed)
73           use Sort;:Naturally, else use perl sort
74
75       %results = $obj->load_file( filename => '/path/to/file', type =>
76       '(cluster|config}' )
77           Load in the specified file and return a hash, parsing the file
78           depending on wther it is a config file (key = value) or cluster
79           file (key value)
80
81
82
83perl v5.32.1                      2021-01-26          App::ClusterSSH::Base(3)
Impressum