|We don't bite newbies here... much|
Re: Is Inline::Java suitable for groovyby afoken (Canon)
|on Jan 23, 2019 at 07:55 UTC||Need Help??|
I notice that the code use jdbc to connect mysql. So is there a way to make use of the class of it from perl?
I may understand you wrong. If so, please ignore this posting.
There is no need to go through Java to connect to MySQL. Perl has at least three ways to do so natively, all start with DBI. The native one is DBD::mysql, but that driver has collected several issues over time. DBD::MariaDB is a fork of DBD::mysql, like MariaDB is a fork of MySQL. DBD::MariaDB can connect to MySQL. The third way is to use DBD::ODBC together with an ODBC manager (comes out of the box with Windows) and an ODBC driver. This has significantly more overhead than the two native drivers.
If you like JDBC, there is also DBD::JDBC that can be used to connect to any database supported by Java, using Java drivers. Of course, this has at least as much overhead as ODBC.
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)