NAME

stag-handle.pl - streams a stag file through a handler into a writer

SYNOPSIS

stag-handle.pl -w itext -c my-handler.pl myfile.xml > processed.itext

DESCRIPTION

will take a Stag compatible format (xml, sxpr or itext), turn the data into an event stream passing it through my-handler.pl

-help|h

shows this document

-writer|w WRITER

writer for final transformed tree; can be xml, sxpr or itext

-codefile|c FILE

a file containing a perlhashref containing event handlers - see below

-sub|s PERL

a perl hashref containing handlers

-trap|t ELEMENT=SUB

EXAMPLES

  unix> 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;
    },
  }

1 POD Error

The following errors were encountered while parsing the POD:

Around line 113:

=over should be: '=over' or '=over positive_number'