FTN-Pkt
view release on metacpan or search on metacpan
lib/FTN/Pkt.pm view on Meta::CPAN
sub new
{
my FTN::Msg $self = shift;
$self = fields::new($self) unless ref $self;
$self->update(@_);
return $self;
}
#========================================================
sub update
{
my FTN::Msg $self = shift;
my %params = @_;
foreach(keys %params){
$self->{$_} = $params{$_};
}
}
#========================================================
lib/FTN/Pkt.pm view on Meta::CPAN
my FTN::Pkt $self = shift;
$self = fields::new($self) unless ref $self;
$self->update(@_);
$self->{_msgs} = [];
return $self;
}
#========================================================
sub update
{
my FTN::Pkt $self = shift;
my %params = @_;
if(exists $params{_msgs}){
croak "FATAL: can't update '_msgs' directly!";
}
foreach(keys %params){
$self->{$_} = $params{$_};
}
}
( run in 0.238 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )