| 1 | |||
| 2 | use strict; | ||
| 3 | |||
| 4 | package WWW::Scraper::Opcode::FORM; | ||
| 5 | use base qw(WWW::Scraper::Opcode); | ||
| 6 | use vars qw($VERSION); | ||
| 7 | |||
| 8 | # new() Scraper::Opcode | ||
| 9 | # $cls - Op class | ||
| 10 | # $scaffold - current scaffold | ||
| 11 | # $params - ref to array of params in the 'OP()' portion of the scaffold. | ||
| 12 | sub new { | ||
| 13 | return bless {'fieldsDiscovered' => ['name','action','method'] }; | ||
| 14 | } | ||
| 15 | |||
| 16 | sub scrape { | ||
| 17 | my ($self, $scraper, $scaffold, $TidyXML, $hit) = @_; | ||
| 18 | |||
| 19 | my ($sub_string, $attributes) = $TidyXML->getMarkedTextAndAttributes('FORM'); | ||
| 20 | return undef unless $attributes; | ||
| 21 | |||
| 22 | return ($self->_next_scaffold($scaffold), $sub_string, $attributes); | ||
| 23 | } | ||
| 24 | |||
| 25 | |||
| 26 | 1; |