Subject: | Perl Versions: Different usage of structure "SERVICES" |
I've found a small bug in Net::Google [0.51].
I've tested this with Michael Schilli's googledrill.pl;
(this script use Net::Google) see:
http://www.linux-magazin.de/Artikel/ausgabe/2002/10/perl/perl.html
-> My result:
# ./googledrill.pl
Global symbol "%HASH(0x828acec)" requires explicit package name at /usr/lib/perl5/site_perl/5.005/Net/Google.pm line 341.
Compilation failed in require at [censored]/googledrill.pl line 10.
BEGIN failed--compilation aborted at [censored]/googledrill.pl line 10.
#
-> Basics:
# cat /proc/version
Linux version 2.2.4 (root@katja) (gcc version 2.7.2.3) #10 Wed Jan 31 18:57:28 MET 2001
# perl -v
This is perl, version 5.005_02 built for i586-linux
[...]
#
Note: The problem is the PERL version:
The structure "SERVICES" in Google.pm should be "&SERVICES" in
my PERL version (see above):
# diff Google.pm.org Google.pm
341,342c341,342
< if (-f "$dir/Net/Google/Services/".SERVICES->{$service}) {
< $self->{'_services'}{$service} = "$dir/Net/Google/Services/".SERVICES->{$service};
---
Show quoted text
> if (-f "$dir/Net/Google/Services/".&SERVICES->{$service}) {
> $self->{'_services'}{$service} = "$dir/Net/Google/Services/".&SERVICES->{$service};
#
Martin Ebert