/usr/share/perl5/Pegex.pm is in libpegex-perl 0.55-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 30 31 32 | use strict; use warnings;
package Pegex;
our $VERSION = '0.55';
use Pegex::Parser;
use Exporter 'import';
our @EXPORT = 'pegex';
sub pegex {
my ($grammar, $receiver) = @_;
die "Argument 'grammar' required in function 'pegex'"
unless $grammar;
if (not ref $grammar or $grammar->isa('Pegex::Input')) {
require Pegex::Grammar;
$grammar = Pegex::Grammar->new(text => $grammar),
}
if (not defined $receiver) {
require Pegex::Tree::Wrap;
$receiver = Pegex::Tree::Wrap->new;
}
elsif (not ref $receiver) {
eval "require $receiver; 1";
$receiver = $receiver->new;
}
return Pegex::Parser->new(
grammar => $grammar,
receiver => $receiver,
);
}
1;
|