Re: [greenstone-devel] Bug in OAIPlug.pm

From John R. McPherson
DateTue, 26 Apr 2005 12:06:01 +1200
Subject Re: [greenstone-devel] Bug in OAIPlug.pm
In-Reply-To (426D836B-30504-cs-waikato-ac-nz)
On Tue, Apr 26, 2005 at 11:55:23AM +1200, Katherine Don wrote:
> Hi Kevin
>
> Thanks for pointing this out. It is indeed a bug, and I have fixed it
> for the next release.

> Kevin Kassil wrote:

> > I found a simple error in perllib/plugins/OAIPlug.pm for GS 2.5/2.6: a
> > misspelled variable name. Can anyone confirm this?


This is why every perl script and module should have 'use strict' at the
top - it means that perl will give an error if you use an undeclared
variable name, instead of silently create a new variable.

I've added it to most of the perl stuff I've touched...

(Note that you'll need to add "no strict 'refs';" as well if you want
to be allowed to use STDOUT and STDERR as a bareword filehandle.)

John