Toby Inkster avatar Toby Inkster committed a03f4b0

Documentation fixes; to_file fix.

Comments (0)

Files changed (2)

     *       space - As with 'append', but leave a blank line separating the
             canonical and non-canonical portions of the graph.
 
-    *       die - throw a hissy fit (fatal error).
+    *       die - cause a fatal error.
 
     Other than the 'onfail' option, this package has exactly the same
-    interface as RDF::Trine::Serializer::NTriples.
+    interface as RDF::Trine::Serializer::NTriples, providing
+    "serialize_model_to_file" and "serialize_model_to_string" methods.
+
+    This package will be considerably slower than the non-canonicalising
+    serializer though, so should only be used for small to medium-sized
+    graphs, and only when you need canonicalisation (e.g. for side-by-side
+    comparison of two graphs to check they're isomorphic; or creating a
+    canonical representation for digital signing).
 
 BUGS
     Please report any bugs to <http://rt.cpan.org/>.

lib/RDF/Trine/Serializer/NTriples/Canonical.pm

 	my $file  = shift;
 	my $model = shift;
 	
-	my $string = serialize_model_to_string($model);
+	my $string = $self->serialize_model_to_string($model);
 	print {$file} $string;
 }
 
 
 =item * space - As with 'append', but leave a blank line separating the canonical and non-canonical portions of the graph.
 
-=item * die - throw a hissy fit (fatal error).
+=item * die - cause a fatal error.
 
 =back
 
 Other than the 'onfail' option, this package has exactly the same
-interface as L<RDF::Trine::Serializer::NTriples>.
+interface as L<RDF::Trine::Serializer::NTriples>, providing
+C<serialize_model_to_file> and C<serialize_model_to_string> methods.
+
+This package will be considerably slower than the non-canonicalising
+serializer though, so should only be used for small to medium-sized
+graphs, and only when you need canonicalisation (e.g. for side-by-side
+comparison of two graphs to check they're isomorphic; or creating a
+canonical representation for digital signing).
 
 =head1 BUGS
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.