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 ];
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};
471 my $number = @items ? $items[0]->number() : '?';
473 @items ? map { "\t".$_->to_string()."\n" } @items : "No previous items\n",
475 @items = grep { $_->exists() } @items;
491 push @items, $new_item;
492 print STDERR "DEBUG[",__PACKAGE__,"::add] $verbsig\n", map { "\t".$_->to_string()."\n" } @items
494 $self->_putback(@items);
540 my @items = $self->items(filter => $f_byalias);
541 foreach my $item ($self->items(filter => $f_byname)) {
542 push @items, $item unless grep { $_ == $item } @items;
544 @items = grep { $_->exists() } @items;
547 if scalar @items > 1;
548 if (scalar @items == 0) {
558 } elsif (scalar @items == 1) {
562 my %alias_platforms = $items[0]->platforms();
567 $items[0]->{platforms} = { %alias_platforms };
570 $items[0]->number() =~ m|^\?| ? '?+' : $items[0]->number();
574 type => $items[0]->type(),
576 intnum => $items[0]->intnum(),
577 version => $self->_adjust_version($items[0]->version()),
578 exists => $items[0]->exists(),
580 features => [ $items[0]->features() ]
582 push @items, $alias_item;
585 map { "\t".$_->to_string()."\n" } @items
587 $self->_putback(@items);
593 "\t", join(", ", map { $_->name() } @items), "\n";
651 foreach ($self->items(filter => sub { $_[0] eq '*' })) {