1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

small cleanup

This commit is contained in:
Sergei Golubchik
2012-02-07 17:18:41 +01:00
parent 2682a280c8
commit 98ae512014
2 changed files with 50 additions and 88 deletions

View File

@ -35,6 +35,19 @@ sub new {
return $self;
}
sub copy {
my $self= shift;
my $copy= My::Test->new();
while (my ($key, $value) = each(%$self)) {
if (ref $value eq "ARRAY") {
push(@{$copy->{$key}}, @$value);
} else {
$copy->{$key}= $value;
}
}
$copy;
}
sub fullname {
my ($self)= @_;
$self->{name} . (defined $self->{combinations}