![]() |
![]()
| ![]() |
![]()
NAMEstag-handle - streams a stag file through a handler into a writer SYNOPSISstag-handle -w itext -c my-handler.pl myfile.xml > processed.itext stag-handle -w itext -p My::Parser -m My::Handler myfile.xml > processed.itext DESCRIPTIONwill take a Stag compatible format (xml, sxpr or itext), turn the data into an event stream passing it through my-handler.pl
EXAMPLESunix> cat my-handler.pl { person => sub { my ($self, $person) = @_; $person->set_fullname($person->get_firstname . ' ' . $person->get_lastname); $person; }, address => sub { my ($self, $address) = @_; # remove addresses altogether from processed file return; }, } POD ERRORSHey! The above document had some coding errors, which are explained below:
|