App-tarweb

 view release on metacpan or  search on metacpan

t/app_tarweb.t  view on Meta::CPAN

            call content => dom {
              find 'ul li a' => [
                dom { attr href => 'foo.html'; content 'foo.html' },
                dom { attr href => 'foo.txt';  content 'foo.txt'  },
              ];
            };
          };

        note http_tx->res->as_string;

        foreach my $href (map { $_->attr('href') } Mojo::DOM58->new(http_tx->res->decoded_content)->find('ul li a')->to_array->@*)
        {
          my $url = URI->new_abs( $href, $url );
          http_request
            GET($url),
            http_response {
              http_code 200;
            }
        }

        $url->path('favicon.ico');

t/app_tarweb.t  view on Meta::CPAN

              http_code 200;
              http_content_type 'text/html';
              call content => dom {
                find 'ul li a' => [
                  dom { attr href => 'foo.html'; content 'foo.html' },
                  dom { attr href => 'foo.txt';  content 'foo.txt'  },
                ];
              };
            };

          foreach my $href (map { $_->attr('href') } Mojo::DOM58->new(http_tx->res->decoded_content)->find('ul li a')->to_array->@*)
          {
            my $url = URI->new_abs( $href, $url );
            http_request
              GET($url),
              http_response {
                http_code 200;
              }
          }

        }



( run in 0.351 second using v1.01-cache-2.11-cpan-26ccb49234f )