major / MySQLTuner-perl

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
GNU General Public License v3.0
8.94k stars 1.29k forks source link

Global symbol "$table_cache_var" requires explicit package name #49

Closed olimortimer closed 10 years ago

olimortimer commented 10 years ago

Just grabbed a copy of MySQLTuner, and hit the following error when running it;

Global symbol "$table_cache_var" requires explicit package name at mysqltuner.pl line 919.
Global symbol "$table_cache_var" requires explicit package name at mysqltuner.pl line 920.
Global symbol "$table_cache_var" requires explicit package name at mysqltuner.pl line 921.
Execution of mysqltuner.pl aborted due to compilation errors (#1)
    (F) You've said "use strict" or "use strict vars", which indicates
    that all variables must either be lexically scoped (using "my" or "state"),
    declared beforehand using "our", or explicitly qualified to say
    which package the global variable is in (using "::").

BEGIN not safe after errors--compilation aborted at /usr/share/perl/5.10/Carp/Heavy.pm line 5.
Compilation failed in require at /usr/share/perl/5.10/Carp.pm line 33.
jonathanvaughn commented 10 years ago

I just had this same problem. Looks like commit e21c34834567c9ffb6838794d5e8877af56c248f merging the PR #48 is at fault.

jonathanvaughn commented 10 years ago

Using the previous version at https://raw.githubusercontent.com/major/MySQLTuner-perl/7a28b64ecfe92aa2f15631eea84b5d638f1cf7ef/mysqltuner.pl worked fine.

olimortimer commented 10 years ago

Fix works perfectly. Thanks!