juliensobrier / Net-Google-SafeBrowsing4

Net::Google::SafeBrowsing4 - Perl library for Google Safebrowsing v4
Apache License 2.0
2 stars 4 forks source link

Syntax error near "..." #24

Closed rpharrison closed 4 years ago

rpharrison commented 4 years ago

I have installed all the required perl modules for this to work Make test fails with the attached output, it does install but when I try to use I just get these syntax errors.

# make test
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 43, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 90, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 116, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 132, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 157, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 187, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 217, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 257, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 292, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 321, near "..."
/root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm has too many errors.
Compilation failed in require at (eval 11) line 3.
        ...propagated at /usr/share/perl5/base.pm line 94.
BEGIN failed--compilation aborted at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage/File.pm line 6.
Compilation failed in require at t/08-gsb-basic.t line 12.
BEGIN failed--compilation aborted at t/08-gsb-basic.t line 12.
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 43, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 90, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 116, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 132, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 157, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 187, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 217, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 257, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 292, near "..."
syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 321, near "..."
/root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm has too many errors.
Compilation failed in require at (eval 14) line 3.
        ...propagated at /usr/share/perl5/base.pm line 94.
BEGIN failed--compilation aborted at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage/File.pm line 6.
Compilation failed in require at t/09-gsb-list.t line 14.
BEGIN failed--compilation aborted at t/09-gsb-list.t line 14.

#   Failed test 'use Net::Google::SafeBrowsing4::Storage;'
#   at t/10-gsb-storage-basic.t line 12.
#     Tried to use 'Net::Google::SafeBrowsing4::Storage'.
#     Error:  syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 43, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 90, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 116, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 132, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 157, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 187, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 217, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 257, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 292, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 321, near "..."
# /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm has too many errors.
# Compilation failed in require at t/10-gsb-storage-basic.t line 12.
# BEGIN failed--compilation aborted at t/10-gsb-storage-basic.t line 12.

#   Failed test 'require Net::Google::SafeBrowsing4::Storage;'
#   at t/10-gsb-storage-basic.t line 15.
#     Tried to require 'Net::Google::SafeBrowsing4::Storage'.
#     Error:  Attempt to reload Net/Google/SafeBrowsing4/Storage.pm aborted.
# Compilation failed in require at (eval 10) line 2.

#   Failed test 'Net::Google::SafeBrowsing4::Storage->can(...)'
#   at t/10-gsb-storage-basic.t line 36.
#     Net::Google::SafeBrowsing4::Storage->can('last_update') failed
#     Net::Google::SafeBrowsing4::Storage->can('add_full_hashes') failed
#     Net::Google::SafeBrowsing4::Storage->can('full_hash_error') failed
#     Net::Google::SafeBrowsing4::Storage->can('full_hash_ok') failed
#     Net::Google::SafeBrowsing4::Storage->can('get_full_hash_error') failed
#     Net::Google::SafeBrowsing4::Storage->can('get_lists') failed
#     Net::Google::SafeBrowsing4::Storage->can('save_lists') failed

#   Failed test 'Abstract method newshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::new called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method saveshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::save called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method resetshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::reset called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method next_updateshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::next_update called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method get_stateshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::get_state called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method get_prefixesshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::get_prefixes called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method updatedshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::updated called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method get_full_hashesshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::get_full_hashes called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method update_errorshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Undefined subroutine &Net::Google::SafeBrowsing4::Storage::update_error called at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method last_updateshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "last_update" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method add_full_hashesshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "add_full_hashes" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method full_hash_errorshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "full_hash_error" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method full_hash_okshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "full_hash_ok" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method get_full_hash_errorshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "get_full_hash_error" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method get_listsshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "get_lists" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.

#   Failed test 'Abstract method save_listsshould be re-defined'
#   at t/10-gsb-storage-basic.t line 39.
# expecting: Regexp ((?-xism:Unimplemented))
# found: Can't locate object method "save_lists" via package "Net::Google::SafeBrowsing4::Storage" at t/10-gsb-storage-basic.t line 39.
# Looks like you failed 19 tests of 19.

#   Failed test 'use Net::Google::SafeBrowsing4::Storage::File;'
#   at t/11-gsb-storage-file-basic.t line 11.
#     Tried to use 'Net::Google::SafeBrowsing4::Storage::File'.
#     Error:  syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 43, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 90, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 116, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 132, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 157, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 187, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 217, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 257, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 292, near "..."
# syntax error at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm line 321, near "..."
# /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage.pm has too many errors.
# Compilation failed in require at (eval 8) line 3.
#       ...propagated at /usr/share/perl5/base.pm line 94.
# BEGIN failed--compilation aborted at /root/Net-Google-SafeBrowsing4/blib/lib/Net/Google/SafeBrowsing4/Storage/File.pm line 6.
# Compilation failed in require at t/11-gsb-storage-file-basic.t line 11.
# BEGIN failed--compilation aborted at t/11-gsb-storage-file-basic.t line 11.

#   Failed test 'require Net::Google::SafeBrowsing4::Storage::File;'
#   at t/11-gsb-storage-file-basic.t line 14.
#     Tried to require 'Net::Google::SafeBrowsing4::Storage::File'.
#     Error:  Attempt to reload Net/Google/SafeBrowsing4/Storage/File.pm aborted.
# Compilation failed in require at (eval 10) line 2.

#   Failed test 'Net::Google::SafeBrowsing4::Storage::File->can(...)'
#   at t/11-gsb-storage-file-basic.t line 35.
#     Net::Google::SafeBrowsing4::Storage::File->can('new') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('save') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('reset') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('next_update') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('get_state') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('get_prefixes') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('updated') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('get_full_hashes') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('update_error') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('last_update') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('add_full_hashes') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('full_hash_error') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('full_hash_ok') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('get_full_hash_error') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('get_lists') failed
#     Net::Google::SafeBrowsing4::Storage::File->can('save_lists') failed
# Looks like you failed 3 tests of 3.
Failed 4/11 test programs. 22/517 subtests failed.
make: *** [test_dynamic] Error 3
geever commented 4 years ago

@rpharrison Which version of Perl you are using? The ... operator was introduced in v5.12, that should be the minimum required version.

rpharrison commented 4 years ago

Mine is 5.10.1, I'll see if it is possible to update, thanks for the quick response.

geever commented 4 years ago

You are welcome. Please report back if you can't, I can actually change them to classical die() statements for the same result. Is it a specific distro/platform that ships such an old version of Perl? (the latest is 5.30)

rpharrison commented 4 years ago

I am running this on CentOS 6.10/cPanel 84. It looks it would be tedious and possibly harmful to try to update this installation of perl.

geever commented 4 years ago

1a56c4788df3201ab44dbcc72e33c5bc3bd5bbc0 is committed. Could you try it?

rpharrison commented 4 years ago

Everything works great now, I'm able to retrieve a copy of the safe browsing database. Thanks for your help.