This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.019-1
in repository libattean-perl.

commit e2d5aa7520003a760d15ad42261dd4a9d7018997
Author: Gregory Todd Williams <g...@evilfunhouse.com>
Date:   Fri Jun 10 21:13:34 2016 -0700

    Fixed as_string serialization of CONSTRUCT algebras (#97).
---
 lib/Attean/Algebra.pm | 6 +++++-
 t/algebra.t           | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/Attean/Algebra.pm b/lib/Attean/Algebra.pm
index 3196ec9..f227d51 100644
--- a/lib/Attean/Algebra.pm
+++ b/lib/Attean/Algebra.pm
@@ -1229,7 +1229,11 @@ package Attean::Algebra::Construct 0.017 {
 
        sub in_scope_variables { return qw(subject predicate object); }
        sub tree_attributes { return; }
-       sub algebra_as_string { return 'Construct' }
+       sub algebra_as_string {
+               my $self        = shift;
+               my $triples     = $self->triples;
+               return sprintf('Construct { %s }', join(' . ', map { 
$_->as_string } @$triples));
+       }
 }
 
 =item * L<Attean::Algebra::Describe>
diff --git a/t/algebra.t b/t/algebra.t
index 4833cb4..47e0848 100644
--- a/t/algebra.t
+++ b/t/algebra.t
@@ -258,10 +258,10 @@ subtest 'Query Serialization' => sub {
        }
 
        {
-               local($TODO)    = 'Fix as_string serialization of CONSTRUCT 
algebras (#97)';
                my $a   = Attean->get_parser('SPARQL')->parse('CONSTRUCT { ?s 
?p 1 } WHERE { ?s ?p 2 }');
                like($a->as_string, qr/Query.*Construct.*BGP/s);
-               like($a->as_string, qr/Triple/s);
+               like($a->as_string, qr/1/s);
+               like($a->as_string, qr/2/s);
        }
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libattean-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to