### This is the main class, the command line shell functionality
sub
new {
my
$class
=
shift
;
$self
= {
scanner
=> Scanner->new,
printer
=> Printer->new, };
bless
$self
,
$class
;
}
sub
run {
my
$self
=
shift
;
$self
->reinit;
$self
->scan;
}
sub
reinit {
my
$self
=
shift
;
$self
->{printer}->println(
"What do you want to do ? [type in the word help for help]"
);
}
sub
scan {
my
$self
=
shift
;
$self
->{scanner}->scan;
}
1;