Lines Matching refs:items
182 foreach ($self->items(sort => by_number())) {
235 foreach ($self->items(%opts, sort => by_number())) {
267 sub items { subroutine
310 my @items = @_;
312 if (scalar @items < 1 || scalar @items > 2) {
313 croak "Wrong number of items: ", scalar @items, "\n ",
314 join("\n ", map { $_->{source}.": ".$_->name() } @items), "\n";
316 if (scalar @items == 2) {
321 foreach (@items) {
331 join(", ", map { $_->name()." => ".$_->intnum() } @items), "\n"
334 join(", ", map { $_->name()." => ".$_->version() } @items), "\n"
338 foreach (@items) {
344 $items[0]->name(), " and ", $items[1]->name(), ":",
349 croak "Duplicate entries for ".$items[0]->name()." from ".
350 $items[0]->source()." and ".$items[1]->source()."\n"
351 if $items[0]->name() eq $items[1]->name()
352 && $items[0]->type() eq $items[1]->type()
353 && $items[0]->platforms() eq $items[1]->platforms();
356 my @platforms = ( { $items[0]->platforms() },
357 { $items[1]->platforms() } );
366 .$tmp_h{$platform} } @items),
378 $items[0]->name(), " and ", $items[1]->name(), "\n";
381 $self->{contents}->[$items[0]->intnum()] = [ @items ];
466 my @items = $self->items(filter => f_name($name));
467 my $version = @items ? $items[0]->version() : $self->{currversion};
468 my $intnum = @items ? $items[0]->intnum() : ++$self->{maxnum};
469 my $number = @items ? $items[0]->number() : '?';
471 @items ? map { "\t".$_->to_string()."\n" } @items : "No previous items\n",
473 @items = grep { $_->exists() } @items;
489 push @items, $new_item;
490 print STDERR "DEBUG[",__PACKAGE__,"::add] $verbsig\n", map { "\t".$_->to_string()."\n" } @items
492 $self->_putback(@items);
538 my @items = $self->items(filter => $f_byalias);
539 foreach my $item ($self->items(filter => $f_byname)) {
540 push @items, $item unless grep { $_ == $item } @items;
542 @items = grep { $_->exists() } @items;
545 if scalar @items > 1;
546 if (scalar @items == 0) {
556 } elsif (scalar @items == 1) {
560 my %alias_platforms = $items[0]->platforms();
565 $items[0]->{platforms} = { %alias_platforms };
568 $items[0]->number() =~ m|^\?| ? '?+' : $items[0]->number();
572 type => $items[0]->type(),
574 intnum => $items[0]->intnum(),
575 version => $self->_adjust_version($items[0]->version()),
576 exists => $items[0]->exists(),
578 features => [ $items[0]->features() ]
580 push @items, $alias_item;
583 map { "\t".$_->to_string()."\n" } @items
585 $self->_putback(@items);
591 "\t", join(", ", map { $_->name() } @items), "\n";
649 foreach ($self->items(filter => sub { $_[0] eq '*' })) {