codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Subroutine call  pagarwalla at 17:29 on Monday, March 10, 2008
 

Hi,

Below is the part of code from a test FW I am working on :
sub run {

[I]my $self = shift;
$self->SUPER::LogDirGen( ); # priti
my $config = new Config::Simple( $self->{ config } );
my %config_hash = $config->vars( );
print ("1..................");
foreach ( @{ $self->{ queue } } ) {
print ("2..................");
Class::Autouse->load( $_ );
my $test_object = $_->new( \%config_hash );
my $test_name = $_;
print ("test object is : $test_object......\n");
print ("test name is : $test_name..................\n");
#$self->SUPER::LogFileGen($test_name); #priti
foreach ( grep( m/^test/, @{ Class::Inspector->methods( $_ ) } ) ) {
print ("4..................");
foreach ( 'setUp', $_, 'tearDown' ) {
print ("5..................");
eval { $test_object->$_( ) };
my $tc = $_;
print ("at the end...$tc \n");
}
}
}
}
This part of code works fine. I try to call "$self->SUPER::LogFileGen($test_name); " commented out in the above code which is a function to redirect my standard outputs to a file. I get the below error :

Can't locate TestCalenders.pm in @INC (@INC contains: C:/usr/
site/lib, C:/usr/lib, .) at C:/usr/site/lib/Automat/Framework/TestSuiteRunner.pm
line 49
Automat::Framework::TestSuiteRunner::run('Automat: :Framework::TestSuiteR
unner=HASH(0x226054)') called at run.pl line 36
# Looks like you failed 3 tests of 25.
# Looks like your test died just after 25.

Below is the sample LogFileGen subroutine:

sub LogFileGen {
my $test_object = $_[1];
print "content-type: $ext/html \n\n";
$FH = "filehandle";
chdir ("Log$now_string");
my $cur = getcwd;
open (OUTPUT, ">$test_object.txt");
my $Test = Test::Builder->new;
$Test->output("$test_object.txt");
return();
}

Can anybody help to solve the issue. And also if someone please explain me why the error is coming when i cann the LogFileGen subroutine.

Thanks,
Priti


  Re: Subroutine call  mimir at 22:49 on Monday, March 10, 2008
 

that code at the top really needs to be indented properly.

"Can't locate TestCalenders.pm in @INC (@INC contains: C:/usr/
site/lib, C:/usr/lib, .) at C:/usr/site/lib/Automat/Framework/TestSuiteRunner.pm
line 49"

The above text means there should be a module 'TestCalenders.pm' in any of the directories listed in @inc.

Check if the module hasn't been installed in any of the directories in @INC.
If not, it either needs to be installed in one of them or @INC needs to be expanded to include whatever path the module is in.










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
• mkdirs
• Re: Web Development Project
• ** Site Hacked ** javascript inserted...
• Losing background/text color when converting HTML to PDF
• hidden div block when displayed, displays at an offset of 200px only in IE 6..
• help - sketch
• Re: Perl Script - File Handling.
• Open a file from website
• Re: to open 5 terminals from one and also execute different commands on each terminal


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008