X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=blobdiff_plain;f=lib%2FMojoFacets%2FData.pm;fp=lib%2FMojoFacets%2FData.pm;h=0f474504346a5d13ba20a876e8adc48cf003ab8c;hp=513adbe5353a2bc67a292ce4b1ce6c17dabe2181;hb=435913283b2941a6e1c20d6b2ac20c7f6895bddd;hpb=caeb866383963c3d9a492e8b0b47de355bee5b25 diff --git a/lib/MojoFacets/Data.pm b/lib/MojoFacets/Data.pm index 513adbe..0f47450 100644 --- a/lib/MojoFacets/Data.pm +++ b/lib/MojoFacets/Data.pm @@ -17,7 +17,7 @@ use File::Find; use Storable; use Time::HiRes qw(time); use File::Path qw(mkpath); -use Text::Unaccent; +use Text::Unaccent::PurePerl; use Digest::MD5; use Statistics::Descriptive; @@ -815,7 +815,7 @@ sub items { $code =~ s{\n+$}{\n}s; # XXX convert @row->{foo} into @{$row->{foo}} - $code =~ s|\@(row->{[^}]+})|\@{\$$1}|gs; + $code =~ s|\@(row->\{[^}]+\})|\@{\$$1}|gs; my $commit = $self->param('commit'); my $test = $self->param('test'); @@ -826,7 +826,7 @@ sub items { if ( $code && ( $test || $commit ) ) { # XXX find columns used in code snippet and show them to user my $order = 0; - foreach my $column ( $code =~ m/\$row->{([^}]+)}/g ) { + foreach my $column ( $code =~ m/\$row->\{([^}]+)\}/g ) { if ( $column =~ s/^(['"])// ) { $column =~ s/$1$//; } @@ -992,7 +992,7 @@ sub items { warn "# sorted_items ", $#$sorted_items + 1, " offset $offset limit $limit order $sort"; my $depends_on; - my $tmp = $code; $tmp =~ s/\$row->{(['"]?)([\w\s]+)\1/$depends_on->{$2}++/gse; + my $tmp = $code; $tmp =~ s/\$row->\{(['"]?)([\w\s]+)\1/$depends_on->{$2}++/gse; warn "# depends_on ",dump $depends_on; my $test_added = Storable::dclone $test_changed;