[Jifty-commit] r4042 - in Test-WWW-Declare: lib/Test/WWW
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Sep 4 14:58:19 EDT 2007
Author: sartak
Date: Tue Sep 4 14:58:18 2007
New Revision: 4042
Modified:
Test-WWW-Declare/ (props changed)
Test-WWW-Declare/lib/Test/WWW/Declare.pm
Log:
r40535 at onn: sartak | 2007-09-04 14:58:05 -0400
Add support for: dump to 'file' which I for one would use a lot
Modified: Test-WWW-Declare/lib/Test/WWW/Declare.pm
==============================================================================
--- Test-WWW-Declare/lib/Test/WWW/Declare.pm (original)
+++ Test-WWW-Declare/lib/Test/WWW/Declare.pm Tue Sep 4 14:58:18 2007
@@ -137,6 +137,8 @@
=cut
# DSLey functions
+sub to($) { return $_[0] }
+
sub _args {
my $args = shift;
return $args if ref($args) eq 'HASH';
@@ -394,6 +396,16 @@
}
}
+# miscellaneous
+# I find myself constantly wanting to dump mech content to a file during
+# testing for diagnosis, so make it easy here: dump to 'mech.html';
+sub dump($) {
+ my $file = shift;
+ open my $handle, '>', $file or die "Unable to open $file for writing: $!";
+ print $handle mech->content;
+ close $handle;
+}
+
# used only for testing that we got T:W:D's goods
sub _twd_dummy { "XYZZY" }
More information about the Jifty-commit
mailing list