pve-installer/Proxmox/UI/Base.pm
Thomas Lamprecht 5c6ca00a12 UI: add ISO env on setup
can be useful for UI's to get resources or the like

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 21:49:00 +02:00

42 lines
597 B
Perl

package Proxmox::UI::Base;
use strict;
use warnings;
use Carp;
# state belongs fully to the UI
# env is a reference to the return value of Proxmox::Install::ISOEnv
sub new {
my ($this, $state, $env) = @_;
my $class = ref($this) || $this;
my $self = bless {
state => $state,
env => $env,
}, $class;
return $self;
}
sub message {
my ($self, $msg) = @_;
croak "implement me in sub-class";
}
sub error {
my ($self, $msg) = @_;
croak "implement me in sub-class";
}
sub prompt {
my ($self, $query) = @_;
croak "implement me in sub-class";
}
1;