in reply to CPAN Testing in multiple platforms how to Debug?

The only way anybody can help you is if you post the code that is failing, both tests and module's code. It would be ideal if you can trim down your code to the failing portion of it.

From that you would get much more advice and directions to make your code platform independent

Does it uses any external libraries like libsomething.so? Does it has any .xs? Is it checking the version of its dependencies? What platforms your code is failing in? Is your module assuming folder separator is "/"? Does it has system calls?

Point is without the code all we can do is guess...

  • Comment on Re: CPAN Testing in multiple platforms how to Debug?

Replies are listed 'Best First'.
Re^2: CPAN Testing in multiple platforms how to Debug?
by paixaop (Novice) on Jun 15, 2010 at 02:39 UTC
    Thanks for your advice. My initial question was more of a generic nature, of how to easily run tests in several platforms. But narrowing it down to my current problem here is the code in question
    eval { $sfr = WWW::Salesforce::Report->new( file => "t/report.csv", ); $data = $sfr->get_report(); };
    the part that fails in the get_report sub is as follows:
    sub get_report () { ... open my $fh,"<", $self->{ file } or croak "Could not open $self->{ file } : $!"; $res = ""; while( <$fh> ) { $res .= $_; } ... }
    report.csv is a file that exists in the test directory or "WWW-Salesforce-Report-0.01/t"

    $self->{ file } is assigned in new to the file name passed in "file"

      Forgot to add the report.csv file:
      "Opportunity Owner","Opportunity Owner Email","Opportunity Name","Amou +nt" "John Doe","john@domain.com","Big Opp","492203.79" "Jane Doe","jane@domain.com","Huge Opp","210456.20"
      File created on a MAC. Will this have problems with the new lines in other platforms?