Forum Moderators: coopster & phranque

Message Too Old, No Replies

Can't locate object method "new" via package "Net::MySQL"

         

Lawbreak

7:06 pm on Jul 8, 2005 (gmt 0)

10+ Year Member




So, I had a perl script that was working just fine which iterates through a bunch of files and inserts using the Net:MySQL package.

I've doublechecked that Net:MySQL and its dependencies are installed (and clearly, the script sees it because it doesn't give an error on require Net::MySQL;), but I continue to get the following error while running the script.

Can't locate object method "new" via package "Net::MySQL"

Does anyone have any ideas?

Thanks,
Scott

wruppert

2:49 am on Jul 9, 2005 (gmt 0)

10+ Year Member



Make sure you actually have "use Net::MySQL;" in your program.

You can get this error if you misspell the package name in the new statement. Check that the capitalization is correct. Net::MySQL, not Net::MySql nor Net::MYSQL, etc.

And try including "use strict;" and "use warnings;" if you have not already.