DS::Target - target of rows.


DSlib documentation  | view source Contained in the DSlib distribution.

Index


NAME

Top

DS::Target - target of rows.

DESCRIPTION

Top

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

Top

None.

METHODS

Top

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

Top

DS::Transformer, DS::Source.

AUTHOR

Top

Written by Michael Zedeler.


DSlib documentation  | view source Contained in the DSlib distribution.