08 Jun 2010 22:03:37 UTC
- Distribution: App-SimpleScan
- Module version: 0.24
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (2 / 57 / 0)
- KwaliteeBus factor: 1
- 68.91% Coverage
- License: unknown
- Activity24 month
- Download (53.79KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionMCMAHON Joe McMahonand 1 contributors
- Joe McMahon
- EXTENDING APP::SIMPLESCAN
- CONFIGURATION AND ENVIRONMENT
- BUGS AND LIMITATIONS
- LICENCE AND COPYRIGHT
- DISCLAIMER OF WARRANTY
App::SimpleScan::TestSpec - store a test spec, and transform it into test code
This document describes App::SimpleScan::TestSpec version 0.01
use App::SimpleScan:TestSpec; App::SimpleScan::TestSpec->app($app_simplescan_object); my $spec = App::SimpleScan::TestSpec->new($test_spec_line); # Fetch the (raw) URI portion of the test spec. my $uri = $spec->uri(); # Fetch the (raw) regex portion of the spec. my $regex = $spec->regex(); # Fetch the regex delimiter. my $delim = $spec->delim; # Fetch the kind of test this is. my $delim = $spec->kind; # Fetch the comment. my $comment = $spec->comment(); # Expand the test spec into test code. # Substitutions should already have been done at this point my @tests = $spec->as_tests();
App::SimpleScan::TestSpeccentralizes the parsing to test specifications and their transformation into code.
Accessor for the owning App::SimpleScan object. Must be called before
as_testsis used to permit access to any substitution pragma data.
Creates a new
TestSpecobject from a test specification line. Actually just extracts the appropriate data and prepares for later substitutions and assembly by
Returns the raw test spec text was originally passed in.
Breaks up the raw line into the proper fields and sets the regex delimiter appropriately.
Since we're parsing a line which may or may not have substitution tokens in it, we have to break it on appropriate whitespace rather than by matching a "real" URI and a "real" regex.
Accessor for the raw URI portion of the test spec.
Accessor for the regex delimiter.
Accessor for the regular expression itself.
Accessor for the kind of test:
Pattern should match.
Pattern should not match.
Pattern does not match currently, but should when code is working properly (TODO).
Pattern matches right now, but shouldn't when code is working properly (TODO).
This test should be skipped; later, it should match.
This test should be skipped; later, it should not match.
Expands the test spec into one or more lines of Perl test code. This method should only be called on test specs that have already been through substitution in the main program.
Plugins can add new command-line options by defining an
optionsclass method which returns a set of parameters appropriate for
App::SimpleScanwill check for this method when you plugin is loaded, and call it to install your options automatically.
None as yet.
App::SimpleScan requires no configuration files or environment variables.
Module::Pluggable and WWW::Mechanize::Pluggable.
Using capturing parentheses in a regex that will be matching non-ASCII characters wil lead to confusion and heartbreak, as this will throw off the capturing of the accent characters. If you need to do this, do the capturing separate from the check of the accented characters.
Please report any bugs or feature requests to
firstname.lastname@example.org, or through the web interface at http://rt.cpan.org.
Copyright (c) 2005, Joe McMahon
<email@example.com >. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Module Install Instructions
To install App::SimpleScan, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install App::SimpleScan
For more information on module installation, please visit the detailed CPAN module installation guide.