WebFetch::Data::Store - Object for management of WebFetch data
$data = webfetch_obj->data; $data->add_fields( "field1",
); $num = $data->num_fields; @field_names = $data->get_fields; $name = $data->field_bynum( 3 ); $data->add_wk_names( "title" => "heading",
"url" => "link",
); $value = $data->get_feed( $name ); $data->set_feed( $name,
$value ); $data->add_record( $field1,
); # order corresponds to add_fields $num = $data->num_records; $record = $data->get_record( $n ); $data->reset_pos; $record = $data->next_record; $name = $data->wk2fname( $wk_name ); $num = $data->fname2fnum( $field_name ); $num = $data->wk2fnum( $wk_name );
This module provides access to the WebFetch data. WebFetch instantiates the object for the input module. The input module uses this to construct the data set from its input. The output module uses the this to access the data and produce its output object/format.
Add the field names in the order their values will appear in the data table.
Returns the number of fields/columns in the data.
Gets a list of the field names in the order their values appear in the data table;
Return a field name string based on the numeric position of the field.
Add associations between WebFetch well-known field names, which allows WebFetch to apply meaning to these fields, such as titles, dates and URLs. The parameters are pairs of well-known and actual field names. Running this function more than once will add to the existing associations of well-known to actual field names.
Get an item of per-feed data by name.
Set an item of per-feed data by name and value.
Add a row to the end of the data table. Values must correspond to the positions of the field names that were provided earlier.
Get the number of records/rows in the data table.
Returns a WebFetch::Data::Record object for the row located by the given row number in the data table. The first row is numbered 0. Calling this function does not affect the position used by the next_record function.
Reset the position counter used by the next_record function back to the beginning of the data table.
The first call to this function returns the first record. Each successive call to this function returns the following record until the end of the data table. After the last record, the function returns undef until reset_pos is called to reset it back to the beginning.
Obtain a field name from a well-known name.
Obtain a field number from a field name.
Obtain a field number from a well-known name.
WebFetch was written by Ian Kluft Send patches,
suggestions and questions to