Update of /cvsroot/net-script/netscript2/src/perl/NetScript
In directory usw-pr-cvs1:/tmp/cvs-serv10916
Modified Files:
Interpreter.pm
Log Message:
* added autoload for DebugLibrary
Index: Interpreter.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Interpreter.pm 9 May 2002 19:14:00 -0000 1.5
--- Interpreter.pm 11 May 2002 13:12:35 -0000 1.6
***************
*** 16,20 ****
#*/
package NetScript::Interpreter;
! use vars qw($VERSION);
use strict;
--- 16,20 ----
#*/
package NetScript::Interpreter;
!
use strict;
***************
*** 29,32 ****
--- 29,33 ----
use NetScript::Engine::StatementEvaluator;
use NetScript::Libraries::DefaultLibrary;
+ use NetScript::Libraries::DebugLibrary;
use NetScript::Util::XMLParserRelay;
use NetScript::Util::FileRetriever;
***************
*** 37,40 ****
--- 38,46 ----
use XML::DOM2::XMLDOMWriterStyle;
+ #--------------------------------------------------------
+ # Globals
+ #--------------------------------------------------------
+ our $VERSION = '2.0'; # Current Version of Class
+
# This is for catching errors at compile-time
use CGI::Carp qw(fatalsToBrowser set_message);
***************
*** 59,104 ****
}
- #--------------------------------------------------------
- # Globals
- #--------------------------------------------------------
- $VERSION = '2.0'; # Current Version of Class
-
- #/**
- # Constant for a Debug-Event
- #*/
- sub DEBUG_EVENT { "NetScript::Interpreter::DEBUG_EVENT"; }
-
- #/**
- # Constant for an Warning-Event
- #*/
- sub WARNING_EVENT { "NetScript::Interpreter::WARNING_EVENT"; }
-
- #/**
- # Constant for a Fatal-Error-Event
- #*/
- sub FATAL_EVENT { "NetScript::Interpreter::FATAL_EVENT"; }
-
- #/**
- # Constant for an Event, that will be raised before parsing of
- # the input file.
- #*/
- sub PARSE_START_EVENT { "NetScript::Interpreter::PARSE_START_EVENT"; }
-
- #/**
- # Constant for an Event, that will be raised after parsing of
- # the input file.
- #*/
- sub PARSE_END_EVENT { "NetScript::Interpreter::PARSE_END_EVENT"; }
-
- #/**
- # Constant for an Event, that will be raised before interpreter will
- # terminate.
- #*/
- sub INTERPRETER_EXIT_EVENT { "NetScript::Interpreter::INTERPRETER_EXIT_EVENT"; }
-
- #/**
- # Constant for the NetScript namespace URI.
- #*/
- sub NETSCRIPT_NAMESPACE_URI { "http://www.insomnia-hq.de/netscript"; }
#/**
--- 65,68 ----
***************
*** 127,130 ****
--- 91,97 ----
my $defLib = NetScript::Libraries::DefaultLibrary -> new();
$defLib -> init( $this );
+
+ my $debugLib = NetScript::Libraries::DebugLibrary -> new();
+ $debugLib -> init( $this );
return $this; # return Object
}
***************
*** 166,170 ****
- $this -> getEventRelay() -> createAndRaiseEvent(&PARSE_START_EVENT());
# start input file parsing
my $domparser = XML::DOM2::DOMParser -> new();
--- 133,136 ----
***************
*** 188,192 ****
- $this -> getEventRelay() -> createAndRaiseEvent(&PARSE_END_EVENT());
# end input file parsing
--- 154,157 ----
***************
*** 194,198 ****
# shutdown
- $this -> getEventRelay() -> createAndRaiseEvent(&INTERPRETER_EXIT_EVENT());
}
--- 159,162 ----
|