summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorbwarken <bwarken>2013-04-12 21:45:56 +0000
committerbwarken <bwarken>2013-04-12 21:45:56 +0000
commitbacf8d74770139ca865d02e079a9e73434a3c275 (patch)
tree49b7e5122f032051f4aa8d191b69ada2111bf365 /contrib
parent5b3aa0fbccaec9f50f29b8bcf555ba4257f96e54 (diff)
downloadgroff-bacf8d74770139ca865d02e079a9e73434a3c275.tar.gz
`glilypond': Replace `state' by global variable. So the Perl version
can be reduced from `v5.9.4' to `v5.6'.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/glilypond/ChangeLog8
-rwxr-xr-xcontrib/glilypond/glilypond.pl8
-rw-r--r--contrib/glilypond/perl_test.pl6
-rw-r--r--contrib/glilypond/subs.pl8
4 files changed, 19 insertions, 11 deletions
diff --git a/contrib/glilypond/ChangeLog b/contrib/glilypond/ChangeLog
index c3134288..86fcbbae 100644
--- a/contrib/glilypond/ChangeLog
+++ b/contrib/glilypond/ChangeLog
@@ -1,3 +1,11 @@
+2013-04-12 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * subs.pl: Replace `state' by global variable. So the Perl
+ version can be older.
+
+ * perl_test.pl: Replace the Perl version by `v5.6', analogously to
+ `groffer'.
+
2013-04-11 Bernd Warken <groff-bernd.warken-72@web.de>
* Makefile.sub: Corrections for Emacs.
diff --git a/contrib/glilypond/glilypond.pl b/contrib/glilypond/glilypond.pl
index 6a297750..af95013a 100755
--- a/contrib/glilypond/glilypond.pl
+++ b/contrib/glilypond/glilypond.pl
@@ -101,9 +101,9 @@ BEGIN {
}
- $\ = "\n"; # adds newline at each print
- $/ = "\n"; # newline separates input
- $| = 1; # flush after each print or write command
+ $\ = "\n"; # adds newline at each print
+ $/ = "\n"; # newline separates input
+ $| = 1; # flush after each print or write command
{
@@ -616,7 +616,7 @@ our $Read =
if ( exists $lilypond_args{ $arg1 } ) {
$lilypond_args{ $arg1 } -> ( $arg2 );
- next;
+ next;
} else {
# not a suitable argument of `.lilypond'
$stderr -> print( "Unknown command: `$arg1' `$arg2': `$line'" );
diff --git a/contrib/glilypond/perl_test.pl b/contrib/glilypond/perl_test.pl
index 1a7954c1..337c052a 100644
--- a/contrib/glilypond/perl_test.pl
+++ b/contrib/glilypond/perl_test.pl
@@ -9,7 +9,7 @@
# Free Software Foundation, Inc.
# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
-# Last update: 18 Mar 2013
+# Last update: 12 Apr 2013
# This file is part of `glilypond', which is part of `groff'.
@@ -31,8 +31,8 @@
# This file tests whether perl has a suitable version. It is used by
# glilypond.pl and Makefile.sub.
-require v5.9.4; # for `state' in `subs.pl'
-
+# former: require v5.9.4; # for `state' in `subs.pl'
+require v5.6; # analogously to `groffer'
########################################################################
### Emacs settings
diff --git a/contrib/glilypond/subs.pl b/contrib/glilypond/subs.pl
index 21d1ae29..c927ae3e 100644
--- a/contrib/glilypond/subs.pl
+++ b/contrib/glilypond/subs.pl
@@ -12,7 +12,7 @@ Installed position: `<prefix>/lib7groff/lilypond/subs.pl'
Copyright (C) 2013 Free Software Foundation, Inc.
Written by Bernd Warken <groff-bernd.warken-72@web.de>
-Last update: 26 Mar 2013
+Last update: 12 Apr 2013
This file is part of `glilypond', which is part of `GNU groff'.
@@ -248,11 +248,11 @@ sub make_dir { # make directory or check if it exists
} # end sub make_dir()
+my $number = 0;
sub next_temp_file {
our ( $Temp, $v, $Args );
- state $n = 0;
- ++$n;
- my $temp_basename = $Args -> { 'prefix' } . '_temp_' . $n;
+ ++$number;
+ my $temp_basename = $Args -> { 'prefix' } . '_temp_' . $number;
my $temp_file = File::Spec -> catfile( $Temp -> { 'temp_dir' } ,
$temp_basename );
$v -> print( "next temporary file: `$temp_file'" );