|
|
PerlSpecial considerations: First of all, in order to get a Perl Parser to work, you need a Perl that supports Windows Scripting Host (WSH) engines. Only ActivePerl (that you can get for free from http://www.activestate.com/) has been verified. Also note that WSH only works on NT/Windows 2000 platforms, so currently you cannot run a Perl Parser from a Unix server. Description: You have access to the standard Java objects from Perl, so the good news are that the general documentation can be used: The Java object JavaObject is in Perl accessed as $JavaObject, and JavaObject.Method() through $JavaObject->Method()
For example, input in an iterator Connector is done though the inp object, so $_ = $inp->readLine(); will assign next line on the input stream to $_ Connector attributes are set/read by the entry attribute: $entry->setAttribute("Number", $number); will set the (self chosen) Connector attribute Number to the internal Perl scalar $number. When writing a Parser, you typically must write the subroutines readEntry and writeEntry : Those are the ones that will be called for input/output. A minimal but useless script is included here. A complete assemblyline example using a Perl-Parser that reads and write is included here. Example:Here is how to create multiple values ("foo" and "bar") in attributes ("Multi1" and "Multi2"): # Create an attribute called Multi1(see the entry object)
# Add an other value to it (see the attribute object)
But there's more than one way: # Create an attribute called Multi2 (assuming it does not exist)
# Add an other value to it
|
|
|