setVar problem

Need help with C, C++, perl, python, etc?

setVar problem

Postby sack » 2006-05-26 06:31

I have problem as listed below:

my $a = 1;
my $b = 0;
my $c = 1;
my $ts = "FAIL";

if ( ($a == 1) && ($b == 1) && ($c == 1) ) {
$ts ="PASS";
exit;
}
$iniFile->setVar("Ress","err","$ts");
$iniFile->setVar("Hist","Res","$ts");

This should return a FAIL but instead I'm getting an error as below:
Can't call method "setVar" on an undefined value....
abnormal termination from the script
sack
 

Postby ajdlinux » 2006-05-26 10:19

Well, the snippet you showed will definitely cause the error as $iniFile has not yet been defined.
ajdlinux
 
Posts: 2480
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

setVar problem

Postby sack » 2006-05-27 11:24

hi,
No its been declard internally.
The problem is fixed ..
Is there a notion that the file in which setVar & getVar are being used should not have execute permission ??

Do update me on this

Thanks
/sack
sack
 


Return to Programming

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable