[libcatmandu-perl] 19/85: Adding documentation for the example Bind functions

Jonas Smedegaard dr at jones.dk
Tue May 20 09:56:16 UTC 2014


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

js pushed a commit to tag 0.91
in repository libcatmandu-perl.

commit 846de0a3877318831e863898f2be71f6288481cb
Author: Patrick Hochstenbach <patrick.hochstenbach at ugent.be>
Date:   Sat May 10 20:32:58 2014 +0200

    Adding documentation for the example Bind functions
---
 lib/Catmandu/Fix/Bind/benchmark.pm | 37 ++++++++++++++++++++++++++++++++++
 lib/Catmandu/Fix/Bind/identity.pm  | 41 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/lib/Catmandu/Fix/Bind/benchmark.pm b/lib/Catmandu/Fix/Bind/benchmark.pm
index c398d20..017ecdb 100644
--- a/lib/Catmandu/Fix/Bind/benchmark.pm
+++ b/lib/Catmandu/Fix/Bind/benchmark.pm
@@ -51,4 +51,41 @@ sub DESTROY {
 	close (OUT);
 }
 
+=head1 NAME
+
+Catmandu::Fix::Bind::benchmark - a binder that calculates the execution time of Fix functions
+
+=head1 SYNOPSIS
+
+ do benchmark(output => /dev/stderr)
+	foo()
+ end
+
+ # will create as side effect computation statistics on the stderr
+
+ elapsed 	command                                 	calls   	sec/comm
+ ----------------------------------------------------------------------------------------------------
+ 0.000006	Catmandu::Fix::foo                      	1 times	0.000006 secs/command
+
+=head1 DESCRIPTION
+
+The benchmark binder computes all the Fix function plus as side effect calculates the execution time
+of all wrapped functions over all input records.
+
+=head1 CONFIGURATION
+
+=head2 output 
+
+Required. The path of a file to which the benchmark statistics will be written.
+
+=head1 AUTHOR
+
+hochsten L<hochsten at cpan.org>
+
+=head1 SEE ALSO
+
+L<Catmandu::Fix::Bind>
+
+=cut
+
 1;
\ No newline at end of file
diff --git a/lib/Catmandu/Fix/Bind/identity.pm b/lib/Catmandu/Fix/Bind/identity.pm
index 223cea5..6d20101 100644
--- a/lib/Catmandu/Fix/Bind/identity.pm
+++ b/lib/Catmandu/Fix/Bind/identity.pm
@@ -4,4 +4,45 @@ use Moo;
 
 with 'Catmandu::Fix::Bind';
 
+=head1 NAME
+
+Catmandu::Fix::Bind::identity - a binder that doesn't influence computation
+
+=head1 SYNOPSIS
+
+	do identity()
+	   fix1()
+	   fix2()
+	   fix3()
+	   .
+	   .
+	   .
+	   fixN()
+	end
+
+	# will have the same (side)effects as
+
+	fix1()
+	fix2()
+	fix3()
+	.
+	.
+	.
+	fixN()
+
+=head1 DESCRIPTION
+
+The identity binder doesn't embody any computational strategy. It simply 
+applies the bound fix functions to its input without any modification.
+
+=head1 AUTHOR
+
+hochsten L<hochsten at cpan.org>
+
+=head1 SEE ALSO
+
+L<Catmandu::Fix::Bind>
+
+=cut
+
 1;
\ No newline at end of file

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



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