Marpa-R2
view release on metacpan or search on metacpan
etc/pod_links.pl view on Meta::CPAN
chdir('pod');
my @pod_files = File::Find::Rule->file()->name( '*.pod' )->in('.');
# die join " ", @pod_files;
my %headers = ();
for my $pod_file (@pod_files) {
my (undef, $dir, $file) = File::Spec->splitpath($pod_file);
my @dirs = grep { $_; } File::Spec->splitdir($dir);
my ($base, $ext) = split m/[.]/xms, $file;
my $pod_name = join '::', qw(Marpa R2), @dirs, $base;
# say $pod_name;
my $tree = Pod::Simple::SimpleTree->new->parse_file($pod_file)->root;
find_header($tree, $pod_name);
}
sub find_header {
my ($subtree, $pod_name) = @_;
if (ref $subtree eq 'ARRAY') {
if (substr($subtree->[0], 0, 4) eq 'head') {
lib/Marpa/R2/MetaAST.pm view on Meta::CPAN
$error = qq{Problem in evaluating character class: "$char_class"\n};
$error .= qq{ Flags were "$flags"\n} if $flags;
$error .= $EVAL_ERROR;
}
return $regex, $error;
}
sub Marpa::R2::Internal::MetaAST::flag_string_to_flags {
my ($raw_flag_string) = @_;
return q{} if not $raw_flag_string;
my @raw_flags = split m/:/xms, $raw_flag_string;
my %flags = ();
RAW_FLAG: for my $raw_flag (@raw_flags) {
next RAW_FLAG if not $raw_flag;
if ( $raw_flag eq 'i' ) {
$flags{'i'} = 1;
next RAW_FLAG;
}
if ( $raw_flag eq 'ic' ) {
$flags{'i'} = 1;
next RAW_FLAG;
( run in 2.151 seconds using v1.01-cache-2.11-cpan-71847e10f99 )