Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries
In directory usw-pr-cvs1:/tmp/cvs-serv24390
Modified Files:
ControlStructuresLibrary.pm
Log Message:
* bugfixes
Index: ControlStructuresLibrary.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ControlStructuresLibrary.pm 11 Jul 2002 22:03:10 -0000 1.6
--- ControlStructuresLibrary.pm 24 Jul 2002 22:47:03 -0000 1.7
***************
*** 169,172 ****
--- 169,173 ----
my $domWalker = $event -> getEventUnknown();
my $node = $domWalker -> currentSource();
+
if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) {
if ($node -> getLocalName() eq "if") {
***************
*** 206,209 ****
--- 207,211 ----
# replace variables
my $se = $this -> interpreter() -> getStatementEvaluator();
+ warn "EVAL: $test";
$test = $se -> evaluateStatement( $test );
eval( $test );
***************
*** 217,220 ****
--- 219,223 ----
#*/
sub ifStart {
+ warn "IF !!!!!!\n" ;
my ( $this, $domWalker, $node ) = @_;
# check condition
***************
*** 227,230 ****
--- 230,234 ----
else {
# condition is true, proceed as usual
+ warn "TEST SUCCESS!" ;
$this -> interpreter() -> newState();
$domWalker -> stepSourceIn();
***************
*** 282,293 ****
my ( $this, $domWalker, $node ) = @_;
# check condition
! if ( $this -> checkNodeTest( $node ) ) {
# test did not succeed, so we jump to the next sibling if any
$domWalker -> stepSourceNext();
}
else {
# condition is true, proceed as usual
- $domWalker -> stepSourceIn();
$this -> interpreter() -> newState();
}
}
--- 286,298 ----
my ( $this, $domWalker, $node ) = @_;
# check condition
! unless ( $this -> checkNodeTest( $node ) ) {
# test did not succeed, so we jump to the next sibling if any
+ $this -> interpreter() -> newState();
$domWalker -> stepSourceNext();
}
else {
# condition is true, proceed as usual
$this -> interpreter() -> newState();
+ $domWalker -> stepSourceIn();
}
}
|