in reply to Re^3: read a hash from a file
in thread read a hash from a file
sub new { my ($self, %args) = @_; my @required = qw(NAME AGE RANK URL); my %cfg = map {uc $_ => $args{$_}} keys %args; for my $req (qw(NAME AGE RANK URL)) { croak "Required argument $req not found" unless exists $cfg{$req}; } return bless \%cfg, $self; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: read a hash from a file
by hdb (Monsignor) on Apr 16, 2013 at 07:08 UTC | |
by Anonymous Monk on Apr 16, 2013 at 07:20 UTC | |
by hdb (Monsignor) on Apr 16, 2013 at 07:29 UTC |