[libmoosex-has-sugar-perl] 04/11: Add cmp_ops.sh script for users of bug #1

Intrigeri intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:37 UTC 2014


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

intrigeri pushed a commit to annotated tag 1.000002-source
in repository libmoosex-has-sugar-perl.

commit 0e9b2505f8e640dfc5ba9e9a0eb969e0c3e5376e
Author: Kent Fredric <kentfredric at gmail.com>
Date:   Thu Jun 26 08:32:28 2014 +1200

    Add cmp_ops.sh script for users of bug #1
---
 benchmark/cmp_ops.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/benchmark/cmp_ops.sh b/benchmark/cmp_ops.sh
new file mode 100644
index 0000000..f337eca
--- /dev/null
+++ b/benchmark/cmp_ops.sh
@@ -0,0 +1,17 @@
+##
+# cmp_ops.sh $PERL  $CODEA $CODEB
+# cmp_ops.sh 5.10.1 'sub baz { code here }' 'sub baz { slightly different code here }'
+#
+# where  5.10.1 would respond to 'perlbrew use 5.10.1'
+# and $CODEA and $CODEB both have a sub 'baz' in them.
+#
+# eg: bash benchmark/cmp_ops.sh  5.10.1 'sub baz { return q[a] }' 'sub baz { q[a] }'
+#
+perlbrew_ver=$1
+shift
+
+diff -Naur <(
+    perlbrew exec --with=${perlbrew_ver} perl -MO=-qq,Concise,-exec,baz -e "$1"
+) <(
+    perlbrew exec --with=${perlbrew_ver} perl -MO=-qq,Concise,-exec,baz -e "$2"
+)

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



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