[libmodule-install-doapchangesets-perl] 04/47: Version 0.00_03 supporting Aaron Cope's vocab + wrapping + reversed version order.

Jonas Smedegaard js at alioth.debian.org
Fri Aug 9 14:08:34 UTC 2013


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

js pushed a commit to branch master
in repository libmodule-install-doapchangesets-perl.

commit 56f08a52d598d5375e452bc9aa369570b7f82edc
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date:   Mon Jan 11 23:43:17 2010 +0000

    Version 0.00_03 supporting Aaron Cope's vocab + wrapping + reversed version order.
    
    --HG--
    branch : Module-Install-DOAPChangeSets
    extra : convert_revision : svn%3A3fe8e991-6959-4966-b76d-b07eca2b6e37/Module-Install-DOAPChangeSets%40123
---
 Changes                                      |   11 +-
 Changes.ttl                                  |   22 +-
 Changes.xml                                  |   29 +++
 META.yml                                     |    2 +-
 Module-Install-DOAPChangeSets-0.00_03.tar.gz |  Bin 0 -> 30243 bytes
 example1.pl                                  |   17 ++
 lib/Module/Install/Admin/DOAPChangeSets.pm   |  319 ++++++++++++++++++++------
 lib/Module/Install/DOAPChangeSets.pm         |    2 +-
 lib/Module/Install/DOAPChangeSets/Format.pod |    6 +
 9 files changed, 334 insertions(+), 74 deletions(-)

diff --git a/Changes b/Changes
index f63ca97..a850548 100644
--- a/Changes
+++ b/Changes
@@ -10,8 +10,15 @@ Home page:    <http://search.cpan.org/dist/Module-Install-DOAPChangeSets/>
 Bug tracker:  <http://rt.cpan.org/Dist/Display.html?Queue=Module-Install-DOAPChangeSets>
 Maintainer:   Toby Inkster <mailto:tobyink at cpan.org>
 
-0.00_01 [2010-01-08] # Omega 1
+0.00_03 [2010-01-11] # Omega 3
+ - (Addition) Use Text::Wrap to wrap text.
+ - (Addition) Support Aaron Cope's changefile vocab as a legacy input
+   format.
+ - Reverse order of versions in Changelog (newest at top)
 
 0.00_02 [2010-01-08] # Omega 2
- - Don't recommend QNames containing '.' -- they're supported by libraptor, but illegal in Turtle.
+ - Don't recommend QNames containing '.' -- they're supported by libraptor,
+   but illegal in Turtle.
+
+0.00_01 [2010-01-08] # Omega 1
 
diff --git a/Changes.ttl b/Changes.ttl
index cb4741a..d5763de 100644
--- a/Changes.ttl
+++ b/Changes.ttl
@@ -38,7 +38,25 @@ my:v_0_00_02
 	rdfs:label	"Omega 2" ;
 	rdfs:comment    "Developer preview."@en ;
 	dcs:changeset [
-		dcs:item [ rdfs:label "Don't recommend QNames containing '.' -- they're supported by libraptor, but illegal in Turtle."@en ]
+		dcs:versus my:v_0_00_01 ;
+		dcs:item
+			[ rdfs:label "Don't recommend QNames containing '.' -- they're supported by libraptor, but illegal in Turtle."@en ]
+	] .
+
+my:v_0_00_03
+
+	a               :Version ;
+	dc:issued	"2010-01-11"^^xsd:date ;
+	:revision	"0.00_03"^^xsd:string ;
+	:file-release   <http://backpan.perl.org/authors/id/T/TO/TOBYINK/Module-Install-DOAPChangeSets-0.00_03.tar.gz> ;
+	rdfs:label	"Omega 3" ;
+	rdfs:comment    "Developer preview."@en ;
+	dcs:changeset [
+		dcs:versus my:v_0_00_02 ;
+		dcs:item
+			[ rdfs:label "Support Aaron Cope's changefile vocab as a legacy input format."@en ; a dcs:Addition ] ,
+			[ rdfs:label "Reverse order of versions in Changelog (newest at top)"@en ] ,
+			[ rdfs:label "Use Text::Wrap to wrap text."@en ; a dcs:Addition ]
 	] .
 
 
@@ -60,7 +78,7 @@ my:project
 	:tester         toby:i ;
 	:created        "2010-01-08"^^xsd:date ;
 	:license        <http://dev.perl.org/licenses/> ;
-	:release        my:v_0_00_01 , my:v_0_00_02 .
+	:release        my:v_0_00_01 , my:v_0_00_02 , my:v_0_00_03 .
 
 #############################################################
 
diff --git a/Changes.xml b/Changes.xml
index 17bc407..e1985db 100644
--- a/Changes.xml
+++ b/Changes.xml
@@ -30,6 +30,7 @@
             <rdfs:label xml:lang="en">Don't recommend QNames containing '.' -- they're supported by libraptor, but illegal in Turtle.</rdfs:label>
           </rdf:Description>
         </dcs:item>
+        <dcs:versus rdf:resource="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#v_0_00_01"/>
       </rdf:Description>
     </dcs:changeset>
     <dc:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-01-08</dc:issued>
@@ -38,6 +39,33 @@
     <rdfs:comment xml:lang="en">Developer preview.</rdfs:comment>
     <rdfs:label>Omega 2</rdfs:label>
   </Version>
+  <Version rdf:about="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#v_0_00_03">
+    <dcs:changeset>
+      <rdf:Description>
+        <dcs:item>
+          <dcs:Addition>
+            <rdfs:label xml:lang="en">Support Aaron Cope's changefile vocab as a legacy input format.</rdfs:label>
+          </dcs:Addition>
+        </dcs:item>
+        <dcs:item>
+          <rdf:Description>
+            <rdfs:label xml:lang="en">Reverse order of versions in Changelog (newest at top)</rdfs:label>
+          </rdf:Description>
+        </dcs:item>
+        <dcs:item>
+          <dcs:Addition>
+            <rdfs:label xml:lang="en">Use Text::Wrap to wrap text.</rdfs:label>
+          </dcs:Addition>
+        </dcs:item>
+        <dcs:versus rdf:resource="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#v_0_00_02"/>
+      </rdf:Description>
+    </dcs:changeset>
+    <dc:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-01-11</dc:issued>
+    <file-release rdf:resource="http://backpan.perl.org/authors/id/T/TO/TOBYINK/Module-Install-DOAPChangeSets-0.00_03.tar.gz"/>
+    <revision rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.00_03</revision>
+    <rdfs:comment xml:lang="en">Developer preview.</rdfs:comment>
+    <rdfs:label>Omega 3</rdfs:label>
+  </Version>
   <Project rdf:about="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#project">
     <bug-database rdf:resource="http://rt.cpan.org/Dist/Display.html?Queue=Module-Install-DOAPChangeSets"/>
     <created rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-01-08</created>
@@ -51,6 +79,7 @@
     <programming-language>Perl</programming-language>
     <release rdf:resource="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#v_0_00_01"/>
     <release rdf:resource="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#v_0_00_02"/>
+    <release rdf:resource="http://search.cpan.org/dist/Module-Install-DOAPChangeSets/#v_0_00_03"/>
     <repository>
       <SVNRepository>
         <browse rdf:resource="http://goddamn.co.uk/viewvc/perlmods/Module-Install-DOAPChangeSets/"/>
diff --git a/META.yml b/META.yml
index 19c9cd0..18e3fb3 100644
--- a/META.yml
+++ b/META.yml
@@ -29,4 +29,4 @@ resources:
   homepage: http://search.cpan.org/dist/Module-Install-DOAPChangeSets/
   license: http://dev.perl.org/licenses/
   repository: http://goddamn.co.uk/viewvc/perlmods/Module-Install-DOAPChangeSets/
-version: 0.00_02
+version: 0.00_03
diff --git a/Module-Install-DOAPChangeSets-0.00_03.tar.gz b/Module-Install-DOAPChangeSets-0.00_03.tar.gz
new file mode 100644
index 0000000..2956da4
Binary files /dev/null and b/Module-Install-DOAPChangeSets-0.00_03.tar.gz differ
diff --git a/example1.pl b/example1.pl
new file mode 100644
index 0000000..7fa8e6a
--- /dev/null
+++ b/example1.pl
@@ -0,0 +1,17 @@
+use lib "lib";
+use Module::Install::Admin::DOAPChangeSets;
+
+my $foo = bless {}, 'Foo';
+
+Module::Install::Admin::DOAPChangeSets::write_doap_changes(
+	$foo, 'trine.ttl', 'trine.txt');
+
+
+package Foo;
+sub name {
+	return 'RDF-Triney';
+}
+sub _top {
+	return $_[0];
+}
+1;
\ No newline at end of file
diff --git a/lib/Module/Install/Admin/DOAPChangeSets.pm b/lib/Module/Install/Admin/DOAPChangeSets.pm
index cb89dad..119030e 100644
--- a/lib/Module/Install/Admin/DOAPChangeSets.pm
+++ b/lib/Module/Install/Admin/DOAPChangeSets.pm
@@ -6,27 +6,20 @@ use RDF::Query;
 use File::Slurp qw(slurp);
 use URI::file;
 use Module::Install::Base;
+use Text::Wrap;
 
 use vars qw{$VERSION @ISA};
 BEGIN {
-	$VERSION = '0.00_02';
+	$VERSION = '0.00_03';
 	@ISA     = qw{Module::Install::Base};
 }
 
-sub write_doap_changes
+sub __write_doap_changes__project_data__current
 {
-	my $self = shift;
-	my $in   = shift || "Changes.ttl";
-	my $out  = shift || "Changes";
-	my $fmt  = shift || "turtle";
+	my $self  = shift;
+	my $model = shift;
+	my $inuri = shift;
 
-	my $IN    = slurp($in);
-	my $inuri = URI::file->new_abs($in);
-
-	my $model  = RDF::Trine::Model->new( RDF::Trine::Store->temporary_store );
-	my $parser = RDF::Trine::Parser->new($fmt);
-	$parser->parse_into_model("$inuri", $IN, $model);
-	
 	my $sparql = "
 	PREFIX dc: <http://purl.org/dc/terms/>
 	PREFIX dcs: <http://ontologi.es/doap-changeset#>
@@ -36,12 +29,79 @@ sub write_doap_changes
 	SELECT *
 	WHERE
 	{
-		<$inuri>
-			dc:title ?title ;
-			dc:subject ?project .
-		?project
-			a doap:Project ;
-			doap:name ?distname .
+		<$inuri> dc:subject ?project .
+		?project	a doap:Project .
+		OPTIONAL { <$inuri> dc:title ?title . }
+		OPTIONAL { <$inuri> rdfs:label ?title . }
+		OPTIONAL { ?project doap:name ?distname . }
+		OPTIONAL { ?project rdfs:label ?distname . }
+		OPTIONAL { ?project dc:title ?distname . }
+		OPTIONAL { ?project doap:created ?created . }
+		OPTIONAL { ?project doap:homepage ?homepage . }
+		OPTIONAL { ?project doap:bug-database ?bugdatabase . }
+		OPTIONAL
+		{
+			?project doap:maintainer ?maint .
+			?maint foaf:name ?maintname .
+			OPTIONAL { ?maint foaf:mbox ?maintmbox . }
+		}
+	}
+	";
+	
+	my $query    = RDF::Query->new($sparql);
+	my $results  = $query->execute($model);
+	my $projects = {};
+	my $doctitle = '';
+	while (my $row = $results->next)
+	{
+		my $p = $row->{'project'}->as_ntriples;
+		$projects->{$p}->{'EXISTS'}++;
+		$projects->{$p}->{'distname'} = $row->{'distname'}->literal_value
+			if UNIVERSAL::isa($row->{'distname'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'created'} = $row->{'created'}->literal_value
+			if UNIVERSAL::isa($row->{'created'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'homepage'}->{ $row->{'homepage'}->uri }++
+			if UNIVERSAL::isa($row->{'homepage'}, 'RDF::Trine::Node::Resource');
+		$projects->{$p}->{'bugdatabase'}->{ $row->{'bugdatabase'}->uri }++
+			if UNIVERSAL::isa($row->{'bugdatabase'}, 'RDF::Trine::Node::Resource');
+		$projects->{$p}->{'maint'}->{ $row->{'maint'}->as_ntriples }->{'name'} = $row->{'maintname'}->literal_value
+			if UNIVERSAL::isa($row->{'maintname'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'maint'}->{ $row->{'maint'}->as_ntriples }->{'mbox'}->{ $row->{'maintmbox'}->uri }++
+			if UNIVERSAL::isa($row->{'maintmbox'}, 'RDF::Trine::Node::Resource');
+		$doctitle = $row->{'title'}->literal_value
+			if UNIVERSAL::isa($row->{'title'}, 'RDF::Trine::Node::Literal');
+	}
+	
+	foreach my $k (keys %$projects)
+	{
+		$projects->{$k}->{'distname'} = $self->_top->name
+			unless length $projects->{$k}->{'distname'};
+	}
+	
+	return [$projects, $doctitle];
+}
+
+sub __write_doap_changes__project_data__legacy
+{
+	my $self  = shift;
+	my $model = shift;
+	my $inuri = shift;
+
+	my $sparql = "
+	PREFIX dc: <http://purl.org/dc/terms/>
+	PREFIX doap: <http://usefulinc.com/ns/doap#>
+	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+	SELECT *
+	WHERE
+	{
+		<$inuri> dc:references ?project .
+		?project	a doap:Project .
+		OPTIONAL { <$inuri> dc:title ?title . }
+		OPTIONAL { <$inuri> rdfs:label ?title . }
+		OPTIONAL { ?project doap:name ?distname . }
+		OPTIONAL { ?project rdfs:label ?distname . }
+		OPTIONAL { ?project dc:title ?distname . }
 		OPTIONAL { ?project doap:created ?created . }
 		OPTIONAL { ?project doap:homepage ?homepage . }
 		OPTIONAL { ?project doap:bug-database ?bugdatabase . }
@@ -61,6 +121,7 @@ sub write_doap_changes
 	while (my $row = $results->next)
 	{
 		my $p = $row->{'project'}->as_ntriples;
+		$projects->{$p}->{'EXISTS'}++;
 		$projects->{$p}->{'distname'} = $row->{'distname'}->literal_value
 			if UNIVERSAL::isa($row->{'distname'}, 'RDF::Trine::Node::Literal');
 		$projects->{$p}->{'created'} = $row->{'created'}->literal_value
@@ -76,6 +137,168 @@ sub write_doap_changes
 		$doctitle = $row->{'title'}->literal_value
 			if UNIVERSAL::isa($row->{'title'}, 'RDF::Trine::Node::Literal');
 	}
+
+	foreach my $k (keys %$projects)
+	{
+		$projects->{$k}->{'distname'} = $self->_top->name
+			unless length $projects->{$k}->{'distname'};
+	}
+
+	return [$projects, $doctitle];
+}
+
+sub __write_doap_changes__release_data__current
+{
+	my $self     = shift;
+	my $model    = shift;
+	my $p        = shift;
+	my $projects = shift;
+	
+	my $sparql = "
+	PREFIX dc: <http://purl.org/dc/terms/>
+	PREFIX dcs: <http://ontologi.es/doap-changeset#>
+	PREFIX doap: <http://usefulinc.com/ns/doap#>
+	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+	SELECT *
+	WHERE
+	{
+		$p doap:release ?version .
+		?version doap:revision ?revision .
+		OPTIONAL { ?version dc:issued ?issued . }
+		OPTIONAL { ?version rdfs:label ?vname . }
+		OPTIONAL
+		{
+			?version dcs:changeset [ dcs:item ?item ] .
+			OPTIONAL { ?item a ?itemtype . }
+			OPTIONAL { ?item rdfs:label ?itemlabel . }
+		}
+	}
+	";
+
+	my $query    = RDF::Query->new($sparql);
+	my $results  = $query->execute($model);
+	while (my $row = $results->next)
+	{
+		my $v = $row->{'version'}->as_ntriples;
+		$projects->{$p}->{'v'}->{$v}->{'EXISTS'}++;
+		
+		$projects->{$p}->{'v'}->{$v}->{'revision'} = $row->{'revision'}->literal_value
+			if UNIVERSAL::isa($row->{'revision'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'v'}->{$v}->{'issued'} = $row->{'issued'}->literal_value
+			if UNIVERSAL::isa($row->{'issued'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'v'}->{$v}->{'name'} = $row->{'vname'}->literal_value
+			if UNIVERSAL::isa($row->{'vname'}, 'RDF::Trine::Node::Literal');
+		
+		if (UNIVERSAL::isa($row->{'item'}, 'RDF::Trine::Node'))
+		{
+			my $c = $row->{'item'}->as_ntriples;
+			$projects->{$p}->{'v'}->{$v}->{'c'}->{$c}->{'label'} = $row->{'itemlabel'}->literal_value
+				if UNIVERSAL::isa($row->{'itemlabel'}, 'RDF::Trine::Node::Literal');
+			$projects->{$p}->{'v'}->{$v}->{'c'}->{$c}->{'type'} = $row->{'itemtype'}->uri
+				if UNIVERSAL::isa($row->{'itemtype'}, 'RDF::Trine::Node::Resource')
+				and $row->{'itemtype'}->uri ne 'http://ontologi.es/doap-changeset#Change';
+		}
+	}
+}
+
+sub __write_doap_changes__release_data__legacy
+{
+	my $self     = shift;
+	my $model    = shift;
+	my $p        = shift;
+	my $projects = shift;
+	
+	my $sparql = "
+	PREFIX dc: <http://purl.org/dc/terms/>
+	PREFIX asc: <http://aaronland.info/ns/changefile/>
+	PREFIX doap: <http://usefulinc.com/ns/doap#>
+	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+	PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+	SELECT *
+	WHERE
+	{
+		?version dc:isVersionOf $p .
+		?version doap:Version [ doap:revision ?revision ] .
+		OPTIONAL { ?version doap:Version [ doap:created ?issued ] . }
+		OPTIONAL { ?version rdfs:label ?vname . }
+		OPTIONAL { ?version asc:changes [ ?itemtype ?itemlabel ] . }
+	}
+	";
+
+	my $query    = RDF::Query->new($sparql);
+	my $results  = $query->execute($model);
+	while (my $row = $results->next)
+	{
+		my $v = $row->{'version'}->as_ntriples;
+		$projects->{$p}->{'v'}->{$v}->{'EXISTS'}++;
+		
+		$projects->{$p}->{'v'}->{$v}->{'revision'} = $row->{'revision'}->literal_value
+			if UNIVERSAL::isa($row->{'revision'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'v'}->{$v}->{'issued'} = $row->{'issued'}->literal_value
+			if UNIVERSAL::isa($row->{'issued'}, 'RDF::Trine::Node::Literal');
+		$projects->{$p}->{'v'}->{$v}->{'name'} = $row->{'vname'}->literal_value
+			if UNIVERSAL::isa($row->{'vname'}, 'RDF::Trine::Node::Literal');
+		
+		if (UNIVERSAL::isa($row->{'itemlabel'}, 'RDF::Trine::Node'))
+		{
+			my $c = $row->{'itemlabel'}->as_ntriples;
+			$projects->{$p}->{'v'}->{$v}->{'c'}->{$c}->{'label'} = $row->{'itemlabel'}->literal_value
+				if UNIVERSAL::isa($row->{'itemlabel'}, 'RDF::Trine::Node::Literal');
+				
+			if (UNIVERSAL::isa($row->{'itemtype'}, 'RDF::Trine::Node::Resource'))
+			{
+				my $u = $row->{'itemtype'}->uri;
+				
+				if ($u =~ m'^http://aaronland.info/ns/changefile/(addition|update|bugfix|removal)$')
+				{
+					$projects->{$p}->{'v'}->{$v}->{'c'}->{$c}->{'type'} =
+						'http://ontologi.es/doap-changeset#'.(ucfirst $1);
+				}
+			}
+		}
+	}	
+}
+
+sub write_doap_changes
+{
+	my $self = shift;
+	my $in   = shift || "Changes.ttl";
+	my $out  = shift || "Changes";
+	my $fmt  = shift || "turtle";
+	my $type = shift || "auto";
+
+	my $IN    = slurp($in);
+	my $inuri = URI::file->new_abs($in);
+
+	my $model  = RDF::Trine::Model->new( RDF::Trine::Store->temporary_store );
+	my $parser = RDF::Trine::Parser->new($fmt);
+	$parser->parse_into_model("$inuri", $IN, $model);
+	
+	if (lc $type eq 'auto')
+	{
+		my $r = RDF::Query->new(
+			"ASK WHERE { ?version <http://ontologi.es/doap-changeset#changeset> ?set .}")
+			->execute($model);
+		if ($r->get_boolean)
+		{
+			$type = 'current';
+		}
+		else
+		{
+			$type = 'legacy';
+		}
+	}
+	
+	my ($projects, $doctitle);
+	if (lc $type eq 'legacy')
+	{
+		($projects, $doctitle) = @{ __write_doap_changes__project_data__legacy($self, $model, $inuri) };
+	}
+	else
+	{
+		($projects, $doctitle) = @{ __write_doap_changes__project_data__current($self, $model, $inuri) };
+	}
 	
 	unless (length $doctitle)
 	{
@@ -96,7 +319,7 @@ sub write_doap_changes
 			$doctitle = "Changes";
 		}
 	}
-	
+
 	open OUT, ">$out";
 	print OUT "#" x 76 . "\n";
 	print OUT "## $doctitle " . ("#" x (72 - length $doctitle)) . "\n";
@@ -125,57 +348,17 @@ sub write_doap_changes
 			else               { print OUT sprintf("Maintainer:   %s\n", $projects->{$project}->{'maint'}->{$m}->{'name'}, $mbox); }
 		}
 		print OUT "\n";
-
-		my $sparql = "
-		PREFIX dc: <http://purl.org/dc/terms/>
-		PREFIX dcs: <http://ontologi.es/doap-changeset#>
-		PREFIX doap: <http://usefulinc.com/ns/doap#>
-		PREFIX foaf: <http://xmlns.com/foaf/0.1/>
-		PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
-		SELECT *
-		WHERE
-		{
-			$project
-				doap:release ?version .
-			
-			?version doap:revision ?revision .
-			OPTIONAL { ?version dc:issued ?issued . }
-			OPTIONAL { ?version rdfs:label ?vname . }
-			OPTIONAL
-			{
-				?version dcs:changeset [ dcs:item ?item ] .
-				OPTIONAL { ?item a ?itemtype . }
-				OPTIONAL { ?item rdfs:label ?itemlabel . }
-			}
+		
+		if (lc $type eq 'legacy')
+		{
+			__write_doap_changes__release_data__legacy($self, $model, $project, $projects);
 		}
-		";
-
-		my $query    = RDF::Query->new($sparql);
-		my $results  = $query->execute($model);
-		while (my $row = $results->next)
+		else
 		{
-			my $p = $project;
-			my $v = $row->{'version'}->as_ntriples;
-			
-			$projects->{$p}->{'v'}->{$v}->{'revision'} = $row->{'revision'}->literal_value
-				if UNIVERSAL::isa($row->{'revision'}, 'RDF::Trine::Node::Literal');
-			$projects->{$p}->{'v'}->{$v}->{'issued'} = $row->{'issued'}->literal_value
-				if UNIVERSAL::isa($row->{'issued'}, 'RDF::Trine::Node::Literal');
-			$projects->{$p}->{'v'}->{$v}->{'name'} = $row->{'vname'}->literal_value
-				if UNIVERSAL::isa($row->{'vname'}, 'RDF::Trine::Node::Literal');
-			
-			if (UNIVERSAL::isa($row->{'item'}, 'RDF::Trine::Node'))
-			{
-				my $c = $row->{'item'}->as_ntriples;
-				$projects->{$p}->{'v'}->{$v}->{'c'}->{$c}->{'label'} = $row->{'itemlabel'}->literal_value
-					if UNIVERSAL::isa($row->{'itemlabel'}, 'RDF::Trine::Node::Literal');
-				$projects->{$p}->{'v'}->{$v}->{'c'}->{$c}->{'type'} = $row->{'itemtype'}->uri
-					if UNIVERSAL::isa($row->{'itemtype'}, 'RDF::Trine::Node::Resource')
-					and $row->{'itemtype'}->uri ne 'http://ontologi.es/doap-changeset#Change';
-			}
+			__write_doap_changes__release_data__current($self, $model, $project, $projects);
 		}
 
-		foreach my $version (sort { $a->{'revision'} cmp $b->{'revision'} } values %{$projects->{$project}->{'v'}})
+		foreach my $version (sort { $b->{'revision'} cmp $a->{'revision'} } values %{$projects->{$project}->{'v'}})
 		{
 			print OUT $version->{'revision'};
 			print OUT sprintf(' [%s]', $version->{'issued'})
@@ -191,7 +374,7 @@ sub write_doap_changes
 				{
 					$sigil = '('.$1.') ';
 				}
-				print OUT sprintf(" - %s%s\n", $sigil, $change->{'label'});
+				print OUT wrap(' - ', '   ', sprintf("%s%s", $sigil, $change->{'label'})) . "\n";
 			}
 			print OUT "\n";
 		}
diff --git a/lib/Module/Install/DOAPChangeSets.pm b/lib/Module/Install/DOAPChangeSets.pm
index e99823f..9821d36 100644
--- a/lib/Module/Install/DOAPChangeSets.pm
+++ b/lib/Module/Install/DOAPChangeSets.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA};
 BEGIN {
-        $VERSION = '0.00_02';
+        $VERSION = '0.00_03';
         @ISA     = 'Module::Install::Base';
 }
 
diff --git a/lib/Module/Install/DOAPChangeSets/Format.pod b/lib/Module/Install/DOAPChangeSets/Format.pod
index 6216f86..7ccb10f 100644
--- a/lib/Module/Install/DOAPChangeSets/Format.pod
+++ b/lib/Module/Install/DOAPChangeSets/Format.pod
@@ -91,6 +91,12 @@ A CPAN e-mail address is also a good idea.
     foaf:mbox   <mailto:joebloggs at cpan.example.org> ;
     foaf:page   <http://search.cpan.example.org/~joebloggs/> .
 
+=head1 Legacy Support
+
+The module has legacy support for Aaron Cope's "changefile" vocab, but this is not
+thoroughly tested. Changelogs written in this vocab tend to use DOAP incorrectly,
+so I discourage using this vocab.
+
 =head1 SEE ALSO
 
 L<Module::Install>, L<Module::Install::DOAPChangeSets> .

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



More information about the Pkg-perl-cvs-commits mailing list