/usr/share/perl5/Apache/ASP/CollectionItem.pm is in libapache-asp-perl 2.62-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | package Apache::ASP::CollectionItem;
use strict;
# for support of $Request->QueryString->('foo')->Item() syntax
sub new {
my($package, $rv) = @_;
my @items = @$rv;
bless {
'Item' => $items[0],
'Items' => \@items,
'Count' => defined $items[0] ? scalar(@items) : 0,
}, $package;
}
sub Count { shift->{Count} };
sub Item {
my($self, $index) = @_;
my $items = $self->{Items};
if(defined $index) {
$items->[$index-1];
} else {
wantarray ? @$items : $items->[0];
}
}
1;
|