in reply to Stumped on an OO Problem
$self->{_permitted} is a reference to %fields. So we take the keys in %fields (the names of your data members), and for each of those we get the values of those fields held by your object; then we join those values into a colon-separated string. Is that what you wanted?sub pack { my $self = shift; return join ':', map $self->{$_}, keys %{ $self->{_permitted} }; }
|
|---|