View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Kenneth Ingham > IDS-HTTP-1.01 > IDS::DataSource::HTTP::Part



Annotate this POD

View/Report Bugs
Module Version: 2.0   Source  

IDS::DataSource::HTTP::Part ^


A common superclass for parts of an HTTP request. All real uses will be through subclasses.

We expect descendents to:

Whenever a string is loaded, parse then (no lazy evaluation). This is because *we* have the function to return the tokens.
Parameters relating to parsing are in the "params" entry, which is a hash reference. It is initialized here.
An optional initializer follows the parameters to new.
Elements of self:
data => the data that caused the parse that we have
tokens => The results of the parse
params => parameters that may affect parsing
The subclass must implement the following functions: parse, empty
parameters() =item parameters(param) =item parameters(param, value, ...)

Set or retrieve the current parameters (individual or group).


Sets all of the default values for the parameters. Normally called by new() or one of its descendents.

handle_parameters($self, @_)

Handle the parameter string that IDS::Algorithm::new() will accept. Extracted from new() for subclass usage. Returns a filehandle if we were called with a filehandle from which to load.


Clean data to prepare for tokenizing.


Return the data used for the tokens we have. If called in array mode, we return the inidividual lines, otherwise the join of those line.


Return the data part of a POST request. Only has meaning in a POST request.

source() =item source(value)

Set and/or get the data source.


Return the tokens that result from parsing the structure. The tokens can be returned as an array or a reference to the internal array holding them (for efficiency). Modify this referenced array at your own risk.

Note that this function can remove values. Note that this function can convert everything to lower case. Both of these options are controlled by parameters, and neither affects the internal version of the tokens.


Expand the %-substitutions. This function currently does not handle unicode and &-expansions. Should it?

Functions for subclasses

The followng functions are required in subclasses.


Parse the structure and return the resulting tokens.


Delete all data in preparation for loading new data.


Copyright 2005-2007, Kenneth Ingham. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Address bug reports and comments to: ids_test at When sending bug reports, please provide the versions of,,, the version of Perl, and the name and version of the operating system you are using. Since Kenneth is a PhD student, the speed of the reponse depends on how the research is proceeding.


Please report them.


IDS::Algorithm, IDS::DataSource

syntax highlighting: