A common superclass for parts of an HTTP request. All real uses will be through subclasses.
We expect descendents to:
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 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.
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?
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 i-pi.com. When sending bug reports, please provide the versions of IDS::Test.pm, IDS::Algorithm.pm, IDS::DataSource.pm, 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.