[Israel.pm] CPAN module for testing a win32 CLI with MySQL

Shlomi Fish shlomif at iglu.org.il
Thu May 6 01:23:00 PDT 2010

Hi Adam,

On Thursday 06 May 2010 10:08:43 Adam BE wrote:
> Hi all,
> I'm looking for a High-level/wrapper CPAN module which can run
> a Windows command and test that it changes the relevant info in the MySQL.
> Something like this:
> $Test_cmd->($parameters, $SQL_query, $expected_MySQL_result)
> Where $expected_SQL_result might be a regex...
> I thought of a combination of Test::Cmd, Test::Simple and DBI...
> Anyone know of a nicer solution or a high-level CPAN module?

Well, Test::Simple is considered very simplistic and most people use at least 
Test::More, if not Test::Most , Test::Class, etc. I'm still using Test::More, 
but often with the help of some CPAN modules, or with defining my own test 
assertions subroutines (using the 
<< local $Test::Builder::Level = $Test::Builder::Level + 1; >> trick.).

Regarding DBI - there are several Object-Relational Mappers available on CPAN 
that may make your life easier - for example:
http://search.cpan.org/dist/DBIx-Class/ (which I had a mostly positive 
experience with). Just make sure you understand the mapping between that and 
the SQL tables.

That's the most I can tell you about offhand without further research. Thanks 
for the tip about Test-Cmd.


	Shlomi Fish

Shlomi Fish       http://www.shlomifish.org/
Best Introductory Programming Language - http://shlom.in/intro-lang

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

More information about the Perl mailing list