/usr/share/perl5/Pegex/Receiver.pm is in libpegex-perl 0.64-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 | package Pegex::Receiver;
use Pegex::Base;
has parser => (); # The parser object.
sub rule { $_[0]->{parser}{rule} }
# Flatten a structure of nested arrays into a single array in place.
sub flatten {
my ($self, $array, $times) = @_;
$times = -1
unless defined $times;
while ($times-- and grep {ref($_) eq 'ARRAY'} @$array) {
@$array = map {
(ref($_) eq 'ARRAY') ? @$_ : $_
} @$array;
}
return $array;
}
1;
|