The document discusses improving the Dev Assistant project, an AI assistant tool, by reducing its use of PERL code and making it more accessible to non-expert Perl programmers. It encourages readers to contribute by forking the project's Github repository, making code changes, and submitting pull requests to help the project team modernize the codebase and provide a better first impression of the Perl language.
8. package myClass;
use strict;
use warnings;
sub new {
my $class = shift;
my $self = {
_hotelName => shift,
_street => shift,
_name => shift,
_date => undef
};
bless $self, $class;
return $self;
}
9. sub enterBookedDate {
my ($self) = shift;
my $date = shift;
$self->{_date} = $date;
}
sub getHotelName {
my $self = shift;
return $self->{_hotelName};
}
# etc ...
10. #!/usr/bin/perl
#use strict;
use warnings;
use POSIX qw(strftime);
use myClass;
my $myClass = new myClass( "Holiday", "Baker Street", "Sherlock Holme
my $tm = strftime "%m/%d/%Y", localtime;
$myClass->enterBookedDate($tm);
print ("The hotel name is ". $myClass->getHotelName() . "n");
print ("The hotel street is ". $myClass->getStreet() . "n");
print ("The hotel is booked on the name ". $myClass->getGuestName() .
print ("Accomodation starts at " . $myClass->getBookedDate() . "n");