I have 2 questions, a specific question about Text::xSV and a more general question about testing.
I think I may have discovered a minor bug in xSV, as shown in the script below. My first question is, is this indeed a bug or did I misunderstand the documentation.
But more importantly, I want to add testing to my coding process. How could this type of "failure" of object creation, if that's what it is, be rewritten with testing... so that I could report it the right way... and eventually begin testing sexier things, like PUGS :)
A specific question I have about testing is, should I not use the strictures with testing, because that would cause the test script not to compile before failing?
I am reading the documentation for Test::Simple, Test::More, and the testing tutorial included with the core install of perl. If there's anything else worth taking a look at, or thinking about, would appreciate insight from those with more experience than me.use warnings; use strict; use Text::xSV; #documentation in http://search.cpan.org/~tilly/Text-xS +V-0.14/lib/Text/xSV.pm #filename set in new(). works. my $csv1 = Text::xSV->new( filename => "filename.txt", header => ["partner", "kampagne", "keywordCluster", "keyword", "clicks", "leads", "orders", "jaronVerguetung", "partnerVerguetung", "profit"], ); $csv1->set_sep(';'); #filename set in set_filename. Doesn't work. #error is "global symbol... requires explicit package name. Fails on +set_filename. But not on set_sep. Weird. my $csv2 = Text::xSV->new( header => ["partner", "kampagne", "keywordCluster", "keyword", "clicks", "leads", "orders", "jaronVerguetung", "partnerVerguetung", "profit"], ); $csv2->set_sep(';'); $cvs2->set_filename("popularixCombined.csv");
UPDATE: Deleted filename => "filename.txt", from creation of second object; didn't mean to have this. Still get the error though. Thanks Corion.
UPDATE 2: Rewrote this using Test::Simple, see below.
UPDATEe 3: This was a variable name typo issue. Well, at least I got started learning the testing stuff... gulp..... /me slinks off.....
In reply to xSV question, and general testing question. by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |