[Bps-public-commit] r15371 - in Test-HTTP-Server-Simple-StashWarnings/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Fri Aug 22 10:07:57 EDT 2008
Author: sartak
Date: Fri Aug 22 10:07:49 2008
New Revision: 15371
Modified:
Test-HTTP-Server-Simple-StashWarnings/trunk/ (props changed)
Test-HTTP-Server-Simple-StashWarnings/trunk/lib/Test/HTTP/Server/Simple/StashWarnings.pm
Log:
r70218 at onn: sartak | 2008-08-22 10:06:54 -0400
Factor out warning encoding into a method
Modified: Test-HTTP-Server-Simple-StashWarnings/trunk/lib/Test/HTTP/Server/Simple/StashWarnings.pm
==============================================================================
--- Test-HTTP-Server-Simple-StashWarnings/trunk/lib/Test/HTTP/Server/Simple/StashWarnings.pm (original)
+++ Test-HTTP-Server-Simple-StashWarnings/trunk/lib/Test/HTTP/Server/Simple/StashWarnings.pm Fri Aug 22 10:07:49 2008
@@ -31,7 +31,7 @@
if ($self->{thss_test_path_hit}) {
my @warnings = splice @{ $self->{'thss_stashed_warnings'} };
- my $content = Storable::nfreeze(\@warnings);
+ my $content = $self->encode_warnings(@warnings);
print "HTTP/1.0 200 OK\r\n";
print "Content-Type: application/x-perl\r\n";
@@ -58,6 +58,13 @@
return $self->NEXT::setup(@_);
}
+sub encode_warnings {
+ my $self = shift;
+ my @warnings = @_;
+
+ return Storable::nfreeze(\@warnings);
+}
+
sub decode_warnings {
my $self = shift;
my $text = shift;
More information about the Bps-public-commit
mailing list