test validation script
authorBill Erickson <berick@esilibrary.com>
Tue, 7 Aug 2012 20:29:03 +0000 (16:29 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 7 Aug 2012 20:30:01 +0000 (16:30 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
validate.pl

index 1df514b..6595255 100644 (file)
@@ -5,23 +5,15 @@ my $work_urls = {
     'dev198.esilibrary.com' => [
         {path => '/eg/opac/record/61'}, # proto, etc.
         {path => '/eg/opac/record/62'}, 
-        {path => '/eg/opac/record/63'},
-        {path => '/eg/opac/record/64'},
-        {path => '/eg/opac/record/65'},
-        {path => '/eg/opac/record/66'},
-        {path => '/eg/opac/record/67'},
-        {path => '/eg/opac/record/68'},
-        {path => '/eg/opac/record/69'},
-        {path => '/eg/opac/record/60'},
-    ]
+    ], 
+    'foo.bar.zug.com' => [{path => '/1'}]
 };
 
 package URLHandler;
 use Net::HTTP::NB;
 use IO::Select;
 
-use overload 
-    '""' => sub {return $_[0]->{url}};
+use overload '""' => sub {return $_[0]->{url}};
 
 sub new {
     my ($class, $args) = @_;
@@ -65,9 +57,12 @@ sub url {
 
 sub process_response {
     my $self = shift;
-    my ($code) = $self->{request}->read_response_headers;
+    my ($code, $msg, %headers) = $self->{request}->read_response_headers;
 
     print "code = $code; url = " . $self->{url} . "\n";
+    print "msg = $msg\n";
+    use Data::Dumper;
+    print Dumper(\%headers);
 
     if ($code eq '200') {