NAME

App::SimpleScan - simple_scan's core code

VERSION

This document describes App::SimpleScan version 0.0.1

SYNOPSIS

  use App::SimpleScan;
  my $app = new App::SimpleScan;
  $app->go;
  

DESCRIPTION

App::SimpleScan allows us to package the core of simple_scan as a class; most importantly, this allows us to use Module::Pluggable to write extensions to this application without directly modifying this module or this simple_scan application.

INTERFACE

new

Creates a new instance of the application.

create_tests

Reads the test input and expands the tests into actual code.

go

Executes the application. Calls create_test to handle the actual test creation.

handle_options

This method initializes your App::SimpleScan object. It installs the standard options (--run, --generate, and --warn), installs any options defined by plugins, and then calls parse_command_line to actually parse the command line and set the options.

install_options(option => receiving_variable, "method_name")

Installs an entry into the options description passed to GeOptions when parse_command_line is called. This automatically creates an accessor for the option. The option description(s) should conform to the requirements of GetOpt::Long.

You may specify as many option descriptions as you like ina single call. Remember that your option definitions will cause a new method to be created for each option; be careful not to accidentally override a pre-existing method.

parse_command_line

Parses the command line and sets the corresponding fields in the App::SimpleScan object. See the section for more information.

app_defaults

Set up the default assumptions for the application. The base method simply turns run on if neither run nor generate is specified.

install_pragma_plugins

This installs the standard pragmas (cache, nocache, and agent) and any supplied by the plugins.

transform_test_specs

Does all the work of transforming test specs into code.

finalize_tests

Adds all of the Perl modules required to run the tests to the test code generated by this module.

tests

Accessor that stores the test code generated during the run.

execute

Actually run the generated test code. Currently just eval's the generated code.

EXTENDING SIMPLESCAN

Adding new command-line options

Plugins can add new command-line options by defining an options class method which returns a set of parameters appropriate for install_options. App::SimpleScan will check for this method when you plugin is loaded, and call it to install your options automatically.

DIAGNOSTICS

None as yet.

CONFIGURATION AND ENVIRONMENT

App::SimpleScan requires no configuration files or environment variables.

DEPENDENCIES

Module::Pluggable and WWW::Mechanize::Pluggable.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-app-simplescan@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Joe McMahon <mcmahon@yahoo-inc.com >

LICENCE AND COPYRIGHT

Copyright (c) 2005, Joe McMahon <mcmahon@yahoo-inc.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.

DISCLAIMER OF WARRANTY

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.