[Patch] Test suite for compare function

Kornel Benko kornel at lyx.org
Sun Nov 8 21:09:04 UTC 2020


Am Mon, 09 Nov 2020 09:00:48 +1300
schrieb "Sam Crawley" <sam at crawley.nz>:

> On Sun, 8 Nov 2020, at 22:28, Kornel Benko wrote:
> > Am Sun, 08 Nov 2020 17:14:42 +1300
> > schrieb "Sam Crawley" <sam at crawley.nz>:
> > ...
> > > diff --git a/lib/scripts/lyx_batch.pl.in b/lib/scripts/lyx_batch.pl.in
> > > index 2d93d27c59..32ef0f974a 100644
> > > --- a/lib/scripts/lyx_batch.pl.in
> > > +++ b/lib/scripts/lyx_batch.pl.in
> > > @@ -8,11 +8,6 @@ use warnings;
> > >  use File::Copy;
> > >  use File::Compare;
> > >  
> > > -sub checkPrecondition();
> > > -sub system1(@);
> > > -sub addFiles($$$);
> > > -sub mycompare($$$);
> > > -
> > 
> > Hm, why are you removing the prototypes?
> > 
> > Kornel
> > 
> > -- 
> > lyx-devel mailing list
> > lyx-devel at lists.lyx.org
> > http://lists.lyx.org/mailman/listinfo/lyx-devel
> 
> The use of prototypes in Perl is generally discouraged (except in very specific
> circumstances), because they don't work in the way most people expect. In this case,
> the prototypes weren't actually being used, as all the function calls are prefixed with
> '&', which bypasses prototype checking. 
> Newer versions of Perl have support for signatures, but probably not really worthwhile
> using for this script. Just made more sense to remove them.

Better to remove '&' IMHO. I was not aware of it.

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201108/f9a38be8/attachment.asc>


More information about the lyx-devel mailing list