groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Musescore-Lilypond-groff


From: Ralph Corderoy
Subject: Re: [Groff] Musescore-Lilypond-groff
Date: Fri, 20 Mar 2015 10:27:44 +0000

Hi Werner,

    > there was a typo in glilypond.pl, now fixed in git (see attached
    > diff).
    ...
    > --- a/contrib/glilypond/glilypond.pl
    > +++ b/contrib/glilypond/glilypond.pl
    > @@ -546,7 +546,7 @@ our $Read =
    >       $ly = new FH_FILE($path_ly);
    >
    >       my $include = new FH_READ_FILE($file);
    > -     my $res = $include->read-all(); # is a refernce to an array
    > +     my $res = $include->read_all(); # is a reference to an array
    >       foreach ( @$res ) {
    >        chomp;
    >        $ly->print($_);

Why isn't perl's -w in use to catch this kind of thing at
byte-code-compile time rather than wait until eyeballs go looking for
odd behaviour?  Or at least have `perl -wc glilypond.pl' be run by `make
check'.  Here, it spots two more flaws.

    $ perl -wc glilypond.pl
    Unquoted string "stderr" may clash with future reserved word at 
glilypond.pl line 409.
    Argument "__DIE__" isn't numeric in array element at glilypond.pl line 16.
    glilypond.pl syntax OK
    $
    $ ed glilypond.pl
    18407
    409s/stderr/$&
              $stderr->print(  "Could not use EPS dir `" . $dir .
    16s/\[__DIE__]/{__DIE__}
    $SIG{__DIE__} = sub { &Carp::croak; };
    w
    18408
    q
    $
    $ perl -wc glilypond.pl
    glilypond.pl syntax OK
    $

glilypond.pl has `use warnings' and friends at the start, but they are
commented out.

Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]