The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DS::Target - target of rows.

DESCRIPTION

This class is the target of rows. It can be bound to any DS::Source, which will send rows to it. Unless you are into writing complicated classes, you will probably never need to inherit directly from this class.

SUPER CLASSES

None.

METHODS

new( $class, $in_type, $source )

Constructor. Instantiates an object of class $class, taking the type $in_type, attached to the source $source. Besides $class, any of the parameters can be left out.

receive_row( $row )

Triggers processing of $row. This method calls process with $row, and then passes the result to pass_row.

attach_source( $source )

Attaches $source as source. This method also validates data types by calling validate_source_type, throwing an exception if the validation fails.

source( $source )

Accessor for source. This method sets the source of this object and triggers type checking.

validate_source_type( $source_type )

Validates source type. If the $source_type is not valid, it returns false, true otherwise. By default, this method ensures that the ingoing type of this object contains no fields not specified in $source_type. Override if you need more complex checking.

in_type( $type )

Accessor for ingoing type.

SEE ALSO

DS::Transformer, DS::Source.

AUTHOR

Written by Michael Zedeler.