PITA::XML::Request - A request for the testing of a software package
# Create a request specification my $dist = PITA::XML::Request->new( scheme => 'perl5', distname => 'PITA-XML', # The package to test file => PITA::XML::File->new( filename => 'Foo-Bar-0.01.tar.gz', digest => 'MD5.0123456789ABCDEF0123456789ABCDEF', ), # Optional fields for repository-based requests authority => 'cpan', authpath => '/id/A/AD/ADAMK/Foo-Bar-0.01.tar.gz', );
PITA::XML::Request is an object for holding information about a request for a distribution to be tested. It is created most often as part of the parsing of a PITA::XML XML file.
PITA::XML::Request
It holds the testing scheme, name of the distribition, file information, and authority information (if the distribution was sourced from a repository such as CPAN)
The id accessor returns the unique identifier of the request, if it has one. This will generally be some form of Data::UUID string.
id
Returns the identifier as a string, or undef if the request has not been assigned an id.
undef
The scheme accessor returns the name of the testing scheme that the distribution is to be tested under.
scheme
In this initial implementation, the following schemes are supported.
Perl 5 general testing scheme.
Auto-detect the specific sub-scheme (currently either perl5.makefile or perl5.build)
perl5.makefile
perl5.build
Traditional Perl 5 testing scheme.
Executes perl Makefile.PL, make, make test, make install.
perl Makefile.PL
make
make test
make install
Module::Build Perl 5 testing scheme.
Executes perl Build.PL, Build, Build test, Build install.
perl Build.PL
Build
Build test
Build install
Perl 6 general testing scheme.
Specifics are yet to be determined.
The distname accessor returns the name of the request as a string.
distname
Most often, this would be something like 'Foo-Bar' with a primary focus on the class Foo::Bar.
The file accessor returns the PITA::XML::File that contains the package to test.
file
If present, the authority accessor returns the name of the package authority. For example, CPAN distributions use the authority 'cpan'.
authority
'cpan'
When testing distributions , the authpath returns the path for the Request file within the CPAN.
authpath
For non-CPAN distributions, returns false (the null string).
The find_file method takes a file or directory as a param (which must exist) and tries to locate the actual file on disk at a location within or relative to the passed path.
find_file
Returns the merge path to the file (if it exists) or undef if not.
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PITA-XML
For other issues, contact the author.
Adam Kennedy <adamk@cpan.org>, http://ali.as/
PITA::XML
The Perl Image-based Testing Architecture (http://ali.as/pita/)
Copyright 2005, 2006 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install PITA::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PITA::XML
CPAN shell
perl -MCPAN -e shell install PITA::XML
For more information on module installation, please visit the detailed CPAN module installation guide.