Hey Guys,
What does the bolded code do? I thought at first it was a code reference but there is no key subroutine in this class nor its parent (Exporter).
What does the bolded code do? I thought at first it was a code reference but there is no key subroutine in this class nor its parent (Exporter).
Code:
require 5.0;
package Change;
use strict;
use vars qw(@ISA @EXPORT);
use lib '.';
use convert;
use integer;
use Carp;
use Time::Local;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw ( timestamp datetime author change_description changelist
filelist new get unget finished put submit);
sub new
{
my ($class,$hash)=@_;
my $change=bless [],$class;
my $key;
if(defined($hash)) {
foreach $key (keys(%$hash)) {
[b]$change->$key( $$hash{$key} );[/b]
}
}
return $change;
}