[Rt-commit] r3545 - in WWW-Mechanize-FromRecording: . lib lib/WWW
lib/WWW/Mechanize t t/basic t/basic_recorded
glasser at bestpractical.com
glasser at bestpractical.com
Thu Jul 28 12:59:35 EDT 2005
Author: glasser
Date: Thu Jul 28 12:59:30 2005
New Revision: 3545
Added:
WWW-Mechanize-FromRecording/.cvsignore
WWW-Mechanize-FromRecording/Changes
WWW-Mechanize-FromRecording/MANIFEST
WWW-Mechanize-FromRecording/Makefile.PL
WWW-Mechanize-FromRecording/README
WWW-Mechanize-FromRecording/lib/
WWW-Mechanize-FromRecording/lib/WWW/
WWW-Mechanize-FromRecording/lib/WWW/Mechanize/
WWW-Mechanize-FromRecording/lib/WWW/Mechanize/FromRecording.pm
WWW-Mechanize-FromRecording/t/
WWW-Mechanize-FromRecording/t/.01.basic.t.swo (contents, props changed)
WWW-Mechanize-FromRecording/t/00.load.t
WWW-Mechanize-FromRecording/t/01.basic.t
WWW-Mechanize-FromRecording/t/basic/
WWW-Mechanize-FromRecording/t/basic.pl
WWW-Mechanize-FromRecording/t/basic/bar.html (contents, props changed)
WWW-Mechanize-FromRecording/t/basic/foo.html (contents, props changed)
WWW-Mechanize-FromRecording/t/basic/image.gif (contents, props changed)
WWW-Mechanize-FromRecording/t/basic_recorded/
WWW-Mechanize-FromRecording/t/basic_recorded/basic.1.in
WWW-Mechanize-FromRecording/t/basic_recorded/basic.1.out
WWW-Mechanize-FromRecording/t/basic_recorded/basic.2.in
WWW-Mechanize-FromRecording/t/basic_recorded/basic.2.out
WWW-Mechanize-FromRecording/t/basic_recorded/basic.3.in
WWW-Mechanize-FromRecording/t/basic_recorded/basic.3.out
WWW-Mechanize-FromRecording/t/basic_recorded/basic.4.in
WWW-Mechanize-FromRecording/t/basic_recorded/basic.4.out
WWW-Mechanize-FromRecording/t/basic_recorded/basic.5.in
WWW-Mechanize-FromRecording/t/basic_recorded/basic.5.out
WWW-Mechanize-FromRecording/t/pod-coverage.t
WWW-Mechanize-FromRecording/t/pod.t
Modified:
WWW-Mechanize-FromRecording/ (props changed)
Log:
r37921 at tin-foil: glasser | 2005-07-28 12:59:03 -0400
Starting WWW::Mechanize::PostMortem.
Added: WWW-Mechanize-FromRecording/.cvsignore
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/.cvsignore Thu Jul 28 12:59:30 2005
@@ -0,0 +1,10 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+HTTP-Recorder-PostMortem-*
+cover_db
Added: WWW-Mechanize-FromRecording/Changes
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/Changes Thu Jul 28 12:59:30 2005
@@ -0,0 +1,5 @@
+Revision history for WWW-Mechanize-FromRecording
+
+0.01 Thu Jul 28 10:21:52 2005
+ Initial release.
+
Added: WWW-Mechanize-FromRecording/MANIFEST
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/MANIFEST Thu Jul 28 12:59:30 2005
@@ -0,0 +1,9 @@
+Changes
+MANIFEST
+META.yml # Will be created by "make dist"
+Makefile.PL
+README
+lib/WWW/Mechanize/FromRecording.pm
+t/00.load.t
+t/pod-coverage.t
+t/pod.t
Added: WWW-Mechanize-FromRecording/Makefile.PL
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/Makefile.PL Thu Jul 28 12:59:30 2005
@@ -0,0 +1,10 @@
+use inc::Module::Install;
+
+name ('WWW-Mechanize-FromRecording');
+author ('David Glasser <glasser at bestpractical.com>');
+version_from ('lib/WWW/Mechanize/FromRecording.pm');
+abstract_from('lib/WWW/Mechanize/FromRecording.pm');
+license('perl');
+requires('Test::More');
+
+&WriteAll;
Added: WWW-Mechanize-FromRecording/README
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/README Thu Jul 28 12:59:30 2005
@@ -0,0 +1,40 @@
+WWW-Mechanize-FromRecording version 0.0.1
+
+[ REPLACE THIS...
+
+ The README is used to introduce the module and provide instructions on
+ how to install the module, any machine dependencies it may have (for
+ example C compilers and installed libraries) and any other information
+ that should be understood before the module is installed.
+
+ A README file is required for CPAN modules since CPAN extracts the
+ README file from a module distribution so that people browsing the
+ archive can use it get an idea of the modules uses. It is usually a
+ good idea to provide version information here so that people can
+ decide whether fixes for the module are worth downloading.
+]
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+
+
+DEPENDENCIES
+
+None.
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2005, Best Practical Solutions LLC.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
Added: WWW-Mechanize-FromRecording/lib/WWW/Mechanize/FromRecording.pm
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/lib/WWW/Mechanize/FromRecording.pm Thu Jul 28 12:59:30 2005
@@ -0,0 +1,360 @@
+package WWW::Mechanize::FromRecording;
+
+our $VERSION = '0.01';
+
+use warnings;
+use strict;
+use Carp;
+
+use base qw/Class::Accessor/;
+
+use HTTP::Response;
+use HTTP::Request;
+use File::Basename ();
+use IO::Dir;
+
+=head1 NAME
+
+WWW::Mechanize::FromRecording - Generate WWW::Mechanize scripts from a recorded HTTP session
+
+
+=head1 SYNOPSIS
+
+ use HTTP::Recorder::PostMortem;
+
+=for author to fill in:
+ Brief code example(s) here showing commonest usage(s).
+ This section will be as far as many users bother reading
+ so make it as educational and exeplary as possible.
+
+
+=head1 DESCRIPTION
+
+=for author to fill in:
+ Write a full description of the module and its features here.
+ Use subsections (=head2, =head3) as appropriate.
+
+
+=head1 METHODS
+
+=cut
+
+=head2 new $prefix
+
+Creates a new L<WWW::Mechanize::FromRecording> object. Sets the C<recorder_prefix>
+to C<$prefix>.
+
+=cut
+
+sub new {
+ my $class = shift;
+ my $self = bless {}, $class;
+ my $prefix = shift;
+ my $base_url = shift;
+ $self->recorder_prefix($prefix);
+ $self->mech_class('WWW::Mechanize');
+ return $self;
+}
+
+=head2 recorder_prefix [$prefix]
+
+Gets or sets the root file name of the recorder logs. For example,
+L<HTTP::Server::Simple::Recorder> uses C</tmp/http-server-simple-recorder> by
+default. The log filenames have the form
+
+ I<recorder_prefix>.I<serial>.I<direction>
+
+where I<serial> is a 1-based serial number and I<direction> is either C<in> (for
+requests) or C<out> (for reponses).
+
+=head2 mech_class [$mech_class]
+
+Gets or sets the Mech class used in the output. Defaults to C<WWW::Mechanize>, but
+you may want C<Test::WWW::Mechanize>, for example.
+
+=cut
+
+__PACKAGE__->mk_accessors(qw/recorder_prefix mech_class/);
+
+=head2 mech_script
+
+Returns a mech script that attempts to replicate the recorded actions.
+
+=cut
+
+sub mech_script {
+ my $self = shift;
+ my $script = <<END_HEAD;
+my \$mech = @{[ $self->mech_class ]}->new;
+
+END_HEAD
+
+ my $last_real_URL;
+
+ for my $messages ($self->_messages) {
+ my $request = $messages->{'request'};
+ my $response = $messages->{'response'};
+
+ my $URL = "http://" . $request->header('Host') . $request->uri;
+
+ my $line = qq(\$mech->get(q{$URL}););
+
+ my $comment = sub { $line .= "\n# ($_[0])" };
+ my $comment_out = sub { $line = "# $line"; $comment->(@_) };
+
+ my $ct = $response->content_type;
+
+ unless ($request->method eq 'GET') {
+ $comment_out->("method was " . $request->method . ", not GET");
+ } elsif ($response->code != 200) {
+ $comment_out->("response code was " . $response->code . ", not 200");
+ } elsif (not defined $ct or not length $ct) {
+ $comment_out->("no content-type returned");
+ } elsif ($ct ne "text/html") {
+ $comment_out->("content-type was $ct, not text/html");
+ } else {
+ # Looks good. What else can we glean?
+
+ my $referer = $request->header('Referer');
+ if (defined $referer and length $referer) {
+ $comment->("looks like we got here from $referer");
+
+ $comment->("hey, that's the last page we went to. maybe we clicked a link.")
+ if $last_real_URL and $referer eq $last_real_URL;
+ }
+
+ $last_real_URL = $URL;
+ }
+
+ $script .= "$line\n\n";
+ }
+
+ return $script;
+}
+
+=begin private
+
+=head2 _messages
+
+Returns a list of hashes with keys C<response> and C<request> corresponded
+to the recorded messages, in order; the values are L<HTTP::Response> and L<HTTP::Request>
+objects.
+
+The first time you call C<_messages>, it automatically calls C<_get_messages> to construct
+this list.
+
+=end private
+
+=cut
+
+sub _messages {
+ my $self = shift;
+ $self->_get_messages unless $self->{'_messages'};
+ @{ $self->{'_messages'} };
+}
+
+=begin private
+
+=head2 _get_messages
+
+Reads the recorded logs at C<recorder_prefix> and creates the structure returned by C<_messages>
+
+=end private
+
+=cut
+
+sub _get_messages {
+ my $self = shift;
+ my @messages;
+ for my $message_pair ($self->_message_file_names) {
+ push @messages, {
+ request => HTTP::Request->parse($self->_slurp($message_pair->[0])),
+ response => HTTP::Response->parse($self->_slurp($message_pair->[1])),
+ };
+ }
+
+ $self->{'_messages'} = \@messages;
+}
+
+=begin private
+
+=head2 _message_file_names
+
+Returns a list of two-element arrays, with each pair containing the input and output file names
+of the recorded files.
+
+=end private
+
+=cut
+
+sub _message_file_names {
+ my $self = shift;
+
+ my($prefix, $dir) = File::Basename::fileparse($self->recorder_prefix);
+
+ my $dh = IO::Dir->new($dir) or die "Couldn't open directory '$dir': $!";
+
+ my %found;
+ $found{'in'} = []; $found{'out'} = [];
+
+ # breaks if file names have leading 0s
+ for my $f ($dh->read) {
+ next unless $f =~ qr/^\Q$prefix\E\.(\d+)\.(in|out)$/;
+
+ $found{$2}[$1] = 1;
+ }
+
+ die "Highest-numbered input and output files don't match!" unless @{ $found{'in'} }== @{ $found{'out'} };
+
+ shift @{ $found{'in'} }; shift @{ $found{'out'} };
+
+ die "Missing some input file(s)!" if grep !defined, @{ $found{'in'} };
+ die "Missing some output file(s)!" if grep !defined, @{ $found{'out'} };
+
+ return map { [$self->recorder_prefix . ".$_.in", $self->recorder_prefix . ".$_.out" ]}
+ 1..@{ $found{'in'} };
+}
+
+
+=begin private
+
+=head2 _slurp $filename
+
+Slurps the file. You know the drill. Dies on error.
+
+=end private
+
+=cut
+
+sub _slurp {
+ my $self = shift;
+ my $filename = shift;
+ open my $fh, '<', $filename or die "Can't open $filename: $!";
+
+ local $/;
+ my $slurped = <$fh>;
+ return $slurped;
+}
+
+=head1 DIAGNOSTICS
+
+=for author to fill in:
+ List every single error and warning message that the module can
+ generate (even the ones that will "never happen"), with a full
+ explanation of each problem, one or more likely causes, and any
+ suggested remedies.
+
+=over
+
+=item C<< Error message here, perhaps with %s placeholders >>
+
+[Description of error here]
+
+=item C<< Another error message here >>
+
+[Description of error here]
+
+[Et cetera, et cetera]
+
+=back
+
+
+=head1 CONFIGURATION AND ENVIRONMENT
+
+=for author to fill in:
+ A full explanation of any configuration system(s) used by the
+ module, including the names and locations of any configuration
+ files, and the meaning of any environment variables or properties
+ that can be set. These descriptions must also include details of any
+ configuration language used.
+
+WWW::Mechanize::FromRecording requires no configuration files or environment variables.
+
+
+=head1 DEPENDENCIES
+
+=for author to fill in:
+ A list of all the other modules that this module relies upon,
+ including any restrictions on versions, and an indication whether
+ the module is part of the standard Perl distribution, part of the
+ module's distribution, or must be installed separately. ]
+
+None.
+
+
+=head1 INCOMPATIBILITIES
+
+=for author to fill in:
+ A list of any modules that this module cannot be used in conjunction
+ with. This may be due to name conflicts in the interface, or
+ competition for system or program resources, or due to internal
+ limitations of Perl (for example, many modules that use source code
+ filters are mutually incompatible).
+
+None reported.
+
+
+=head1 BUGS AND LIMITATIONS
+
+=for author to fill in:
+ A list of known problems with the module, together with some
+ indication Whether they are likely to be fixed in an upcoming
+ release. Also a list of restrictions on the features the module
+ does provide: data types that cannot be handled, performance issues
+ and the circumstances in which they may arise, practical
+ limitations on the size of data sets, special cases that are not
+ (yet) handled, etc.
+
+No bugs have been reported.
+
+Please report any bugs or feature requests to
+C<bug-http-recorder-postmortem at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org>.
+
+=head1 SEE ALSO
+
+L<HTTP::Server::Simple::Recorder> creates files in the appropriate format from
+L<HTTP::Server::Simple> applications.
+
+L<HTTP::Recorder> is an inspiration for this module, but it is not actually
+related.
+
+=head1 AUTHOR
+
+David Glasser C<< <glasser at bestpractical.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2005, Best Practical Solutions, LLC. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+
+=head1 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.
+
+=cut
+
+1;
Added: WWW-Mechanize-FromRecording/t/.01.basic.t.swo
==============================================================================
Binary file. No diff available.
Added: WWW-Mechanize-FromRecording/t/00.load.t
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/00.load.t Thu Jul 28 12:59:30 2005
@@ -0,0 +1,7 @@
+use Test::More tests => 1;
+
+BEGIN {
+use_ok( 'WWW::Mechanize::FromRecording' );
+}
+
+diag( "Testing WWW::Mechanize::FromRecording $WWW::Mechanize::FromRecording::VERSION" );
Added: WWW-Mechanize-FromRecording/t/01.basic.t
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/01.basic.t Thu Jul 28 12:59:30 2005
@@ -0,0 +1,18 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More 'no_plan';
+
+BEGIN { use_ok 'WWW::Mechanize::FromRecording' }
+
+my $PM = WWW::Mechanize::FromRecording->new('t/basic_recorded/basic');
+isa_ok($PM, 'WWW::Mechanize::FromRecording');
+
+my $script = $PM->mech_script;
+
+like($script, qr/my \$mech = WWW::Mechanize->new;/);
+
+warn $script;
+
Added: WWW-Mechanize-FromRecording/t/basic.pl
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic.pl Thu Jul 28 12:59:30 2005
@@ -0,0 +1,18 @@
+BasicServer->new->run;
+
+package BasicServer;
+
+use base qw/HTTP::Server::Simple::Recorder HTTP::Server::Simple::CGI/;
+use HTTP::Server::Simple::Static;
+
+sub recorder_prefix { 'basic_recorded/basic' }
+
+sub handle_request {
+ my $self = shift;
+ my $cgi = shift;
+ unless ($self->serve_static($cgi, 'basic')) {
+ print "HTTP/1.1 404 File Not Found\nContent-Length:0\n\n";
+ }
+ return 1;
+}
+
Added: WWW-Mechanize-FromRecording/t/basic/bar.html
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic/bar.html Thu Jul 28 12:59:30 2005
@@ -0,0 +1,4 @@
+<html>
+<head><title>Bar</title></head>
+<body>Bar.</body>
+</html>
Added: WWW-Mechanize-FromRecording/t/basic/foo.html
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic/foo.html Thu Jul 28 12:59:30 2005
@@ -0,0 +1,4 @@
+<html>
+<head><title>Foo</title></head>
+<body>Foo links to <a href="bar.html">bar</a> and has this image: <img src="image.gif" /></body>
+</html>
Added: WWW-Mechanize-FromRecording/t/basic/image.gif
==============================================================================
Binary file. No diff available.
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.1.in
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.1.in Thu Jul 28 12:59:30 2005
@@ -0,0 +1,9 @@
+GET /foo.html HTTP/1.1
+Accept: */*
+Accept-Language: en
+Accept-Encoding: gzip, deflate
+Cookie: RT_SID_example.com.8080=fb7848a4cf2576752a010462d0a70027; style=black with blue on white
+User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
+Connection: keep-alive
+Host: localhost:8080
+
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.1.out
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.1.out Thu Jul 28 12:59:30 2005
@@ -0,0 +1,8 @@
+HTTP/1.1 200 OK
+Content-type: text/html
+Content-length: 144
+
+<html>
+<head><title>Foo</title></head>
+<body>Foo links to <a href="bar.html">bar</a> and has this image: <img src="image.gif" /></body>
+</html>
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.2.in
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.2.in Thu Jul 28 12:59:30 2005
@@ -0,0 +1,10 @@
+GET /image.gif HTTP/1.1
+Accept: */*
+Accept-Language: en
+Accept-Encoding: gzip, deflate
+Cookie: RT_SID_example.com.8080=fb7848a4cf2576752a010462d0a70027; style=black with blue on white
+Referer: http://localhost:8080/foo.html
+User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
+Connection: keep-alive
+Host: localhost:8080
+
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.2.out
==============================================================================
Binary files (empty file) and WWW-Mechanize-FromRecording/t/basic_recorded/basic.2.out Thu Jul 28 12:59:30 2005 differ
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.3.in
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.3.in Thu Jul 28 12:59:30 2005
@@ -0,0 +1,9 @@
+GET /favicon.ico HTTP/1.1
+Accept: */*
+Accept-Language: en
+Accept-Encoding: gzip, deflate
+Cookie: RT_SID_example.com.8080=fb7848a4cf2576752a010462d0a70027; style=black with blue on white
+User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
+Connection: keep-alive
+Host: localhost:8080
+
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.3.out
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.3.out Thu Jul 28 12:59:30 2005
@@ -0,0 +1,3 @@
+HTTP/1.1 404 File Not Found
+Content-Length:0
+
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.4.in
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.4.in Thu Jul 28 12:59:30 2005
@@ -0,0 +1,10 @@
+GET /bar.html HTTP/1.1
+Accept: */*
+Accept-Language: en
+Accept-Encoding: gzip, deflate
+Cookie: RT_SID_example.com.8080=fb7848a4cf2576752a010462d0a70027; style=black with blue on white
+Referer: http://localhost:8080/foo.html
+User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
+Connection: keep-alive
+Host: localhost:8080
+
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.4.out
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.4.out Thu Jul 28 12:59:30 2005
@@ -0,0 +1,8 @@
+HTTP/1.1 200 OK
+Content-type: text/html
+Content-length: 65
+
+<html>
+<head><title>Bar</title></head>
+<body>Bar.</body>
+</html>
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.5.in
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.5.in Thu Jul 28 12:59:30 2005
@@ -0,0 +1,9 @@
+GET /favicon.ico HTTP/1.1
+Accept: */*
+Accept-Language: en
+Accept-Encoding: gzip, deflate
+Cookie: RT_SID_example.com.8080=fb7848a4cf2576752a010462d0a70027; style=black with blue on white
+User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
+Connection: keep-alive
+Host: localhost:8080
+
Added: WWW-Mechanize-FromRecording/t/basic_recorded/basic.5.out
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/basic_recorded/basic.5.out Thu Jul 28 12:59:30 2005
@@ -0,0 +1,3 @@
+HTTP/1.1 404 File Not Found
+Content-Length:0
+
Added: WWW-Mechanize-FromRecording/t/pod-coverage.t
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/pod-coverage.t Thu Jul 28 12:59:30 2005
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();
Added: WWW-Mechanize-FromRecording/t/pod.t
==============================================================================
--- (empty file)
+++ WWW-Mechanize-FromRecording/t/pod.t Thu Jul 28 12:59:30 2005
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
More information about the Rt-commit
mailing list