Lines Matching refs:self

118     my $self = shift;
154 $self->{contents} = [ @tmp_contents ];
155 $self->{name2num} = { %tmp_name2num };
156 $self->{maxassigned} = $max_assigned;
157 $self->{maxnum} = $max_num;
158 $self->{filename} = $filename;
163 $self->{loaded_contents}->[$i] =
168 $self->{loaded_maxnum} = $max_num;
179 my $self = shift;
182 foreach ($self->items(sort => by_number())) {
188 $self->{maxassigned} = $max_assigned;
205 my $self = shift;
208 $self->write($self->{filename}, %opts);
225 my $self = shift;
232 $self->validate();
235 foreach ($self->items(%opts, sort => by_number())) {
239 $self->{filename} = $filename;
240 $self->{loaded_maxnum} = $self->{maxnum};
268 my $self = shift;
279 @l = $index ? @{$self->{contents}->[$index] // []} : ();
281 my $index = $self->{name2num}->{$filter->[1]};
282 @l = $index ? @{$self->{contents}->[$index] // []} : ();
289 @{$self->{contents}};
309 my $self = shift;
381 $self->{contents}->[$items[0]->intnum()] = [ @items ];
385 my $self = shift;
407 my $self = shift;
427 my $self = shift;
429 my $baseversion = $self->{baseversion};
452 my $self = shift;
468 my @items = $self->items(filter => f_name($name));
469 my $version = @items ? $items[0]->version() : $self->{currversion};
470 my $intnum = @items ? $items[0]->intnum() : ++$self->{maxnum};
474 if $self->{debug};
484 $self->_adjust_version($version),
493 if $self->{debug};
494 $self->_putback(@items);
497 my $alias = $self->{aliases}->{$name};
498 delete $self->{aliases}->{$name};
502 push @returns, $self->add_alias($source, $alias->{name}, $name, @{$alias->{defs}})
520 my $self = shift;
540 my @items = $self->items(filter => $f_byalias);
541 foreach my $item ($self->items(filter => $f_byname)) {
551 $self->{aliases}->{$name} = { source => $source,
556 if $self->{debug};
577 version => $self->_adjust_version($items[0]->version()),
586 if $self->{debug};
587 $self->_putback(@items);
623 my $self = shift;
649 $self->{currversion} = $version;
650 $self->{baseversion} = $baseversion;
651 foreach ($self->items(filter => sub { $_[0] eq '*' })) {
652 $_->{version} = $self->{currversion};
666 my $self = shift;
668 foreach (@{$self->{contents}}) {
673 $self->{stats} = {};
685 my $self = shift;
687 $self->{stats} = {};
688 for my $i (1..$self->{maxnum}) {
689 if ($i > $self->{loaded_maxnum}
690 || (!@{$self->{loaded_contents}->[$i] // []}
691 && @{$self->{contents}->[$i] // []})) {
692 $self->{stats}->{new}++;
694 if ($i <= $self->{maxassigned}) {
695 $self->{stats}->{assigned}++;
697 $self->{stats}->{unassigned}++;
699 next if ($i > $self->{loaded_maxnum});
702 map { $_->to_string() } @{$self->{loaded_contents}->[$i] // []};
704 map { $_->to_string() } @{$self->{contents}->[$i] // []};
710 $self->{stats}->{modified}++;
722 my $self = shift;
724 return %{$self->{stats}};
897 my $self = shift;
902 croak "$funcname invalid" unless exists $self->{$item};
903 return $self->{$item} if ref($self->{$item}) eq '';
904 return @{$self->{$item}} if ref($self->{$item}) eq 'ARRAY';
905 return %{$self->{$item}} if ref($self->{$item}) eq 'HASH';
919 my $self = shift;
924 $self->{$item} = "$value" if defined $value;
925 return $self->{$item};
929 my $self = shift;
934 $self->{$item} = "$value" if defined $value;
935 return $self->{$item};
945 my $self = shift;
948 my %platforms = $self->platforms();
949 my @features = $self->features();
950 my $version = $self->version();
953 $self->name(),
954 $self->number(),
956 $self->exists() ? 'EXIST' : 'NOEXIST',
959 $self->type(),