1b39c5158Smillertpackage EmptyParser; 2b39c5158Smillert 3b39c5158Smillertuse strict; 4*6fb12b70Safresh1use warnings; 5b39c5158Smillert 6*6fb12b70Safresh1use base qw(TAP::Parser); 7b39c5158Smillert 8b39c5158Smillertsub _initialize { 9b39c5158Smillert shift->_set_defaults; 10b39c5158Smillert} 11b39c5158Smillert 12b39c5158Smillert# this should really be in TAP::Parser itself... 13b39c5158Smillertsub _set_defaults { 14b39c5158Smillert my $self = shift; 15b39c5158Smillert 16898184e3Ssthen for my $key (qw( grammar_class result_factory_class )) { 17b39c5158Smillert my $default_method = "_default_$key"; 18b39c5158Smillert $self->$key( $self->$default_method() ); 19b39c5158Smillert } 20b39c5158Smillert 21b39c5158Smillert return $self; 22b39c5158Smillert} 23b39c5158Smillert 24b39c5158Smillert1; 25