Benchmark-Perl-Formance-Cargo
view release on metacpan or search on metacpan
share/P6STD/std_hilite/STD_syntax_highlight view on Meta::CPAN
$str .= $dumper->dump(@yaml);
$str;
}
=item redspans_traverse
Walk the path that no one wanted to travel ;)
=cut
sub redspans_traverse($%) {
my ($process_buffer,%colors) = @ARG;
my ($last_tree,$buffer, $last_type) = ("","","");
for my $i (0 .. @loc-1) {
next unless defined $loc[$i];
my $c = substr($src_text,$i,1);
my $tree = "";
for my $action_ref (@{$loc[$i]}) {
$tree .= ${$action_ref} . " ";
}
share/P6STD/tools/DumpMatch.pm view on Meta::CPAN
use strict;
use warnings;
use Exporter;
our @ISA = 'Exporter';
our @EXPORT = qw(traverse_match dump_match);
our @EXPORT_OK = qw(process_events);
our $NOCOLOR;
sub RESET() {$NOCOLOR ? '' : Term::ANSIColor::RESET()};
sub RED() {$NOCOLOR ? '' : Term::ANSIColor::RED() };
sub BLUE() {$NOCOLOR ? '' : Term::ANSIColor::BLUE() };
sub YELLOW() {$NOCOLOR ? '' : Term::ANSIColor::YELLOW() };
sub process_events {
my ($orig,$events,$opt) = @_;
my $str = "";
my $at = 0;
my $indent=0;
for (sort {$a->[0] <=> $b->[0] or $a->[4] <=> $b->[4]} @{$events}) {
my $text = substr($orig,$at,$_->[0]-$at);
if ($opt->{vertical}) {
if ($text) {
( run in 1.874 second using v1.01-cache-2.11-cpan-65fba6d93b7 )