App-SimpleScan

 view release on metacpan or  search on metacpan

bin/simple_scan  view on Meta::CPAN

Now setting the enviroment variable C<LANGUAGE> in your shell to 'perl'
will propagate 'perl' into the test spec as the language we're testing for.

=head1 OTHER PRAGMAS DEFINED BY SIMPLE_SCAN

There are a few other pragmas defined directly by C<simple_scan>. These
are not plugins, but are implemented directly in the code.

=head2 agent

The C<agent> pragma allows you to switch user agents during the test. 
C<Test::WWW::Simple>'s default is C<Windows IE 6>, but you can switch it
to any of the other user agent aliases supported by C<WWW::Mechanize>.

   http://gemal.dk/browserspy/basic.html /Explorer/ Y Should be Explorer
   %%agent: Mac Safari
   http://gemal.dk/browserspy/basic.html /Safari/ Y Should be Safari

(Note: gemal.dk actually does tell you what browser you're running, so
feel free to try this test yourself.)

=head2 cache

The C<cache> pragma turns on URL caching; once enabled, the page returned
on the I<first> access to a URL is returned directly from a memory cache,
without its being reaccessed from the Web.

Using C<cache> can result in major speedups for tests which repeatedly
hit the same page. 

=head2 nocache

The C<nocache> pragma turns I<off> URL caching; this is useful if you
have something like a REST interface that may return different values 
from repeated accesses to the same URL.

=head1 PLUGINS

simple_scan is extended via plugins in the C<App::SimpleScan::Plugin>
namespace. Currently-released plugins:

=over 4

=item * C<App::SimpleScan::Plugin::Cache> - disk-based caching

=item * C<App::SimpleScan::Plugin::Snapshot> - HTML snapshots of tests

=item * C<App::SimpleScan::Plugin::Plaintext> - check un-marked-up page text

=item * C<App::SimpleScan::Plugin::Retry> - retries HTTP failures

=item * C<App::SimpleScan::Plugin::LinkCheck> - link counting/presence/absence

=item * C<App::SimpleScan::Plugin::Forget> - discard a substitution

Read the documentation for these plugin classes for information on 
pragmas and/or command-line options that they provide.

=back 

=head1 BUGS AND LIMITATIONS

Substitutions, especially when there are large numbers of variables 
with multiple values, are slow. (Welcome to the world of combinatory
explosion.) A future release should use the dependency tree we're 
going to need anyway to detect circular references to eliminate 
variables that cannot possibly be substituted into the current 
string, thereby decreasing the load on the combination checker.

=head1 AUTHOR

Joe McMahon E<lt>mcmahon@cpan.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (c) 2005, 2006 by Yahoo!

This script is free software; you can redistribute it or modify it under the
same terms as Perl itself, either Perl version 5.6.1 or, at your option, any
later version of Perl 5 you may have available.



( run in 0.395 second using v1.01-cache-2.11-cpan-39bf76dae61 )