[Http-webtest-commits] HTTP-WebTest/lib/HTTP/WebTest API.pm,1.27,1.28
Brought to you by:
m_ilya,
richardanderson
From: Ilya M. <m_...@us...> - 2003-01-25 17:45:54
|
Update of /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest In directory sc8-pr-cvs1:/tmp/cvs-serv2490/lib/HTTP/WebTest Modified Files: API.pm Log Message: Let use non-default parser class Index: API.pm =================================================================== RCS file: /cvsroot/http-webtest/HTTP-WebTest/lib/HTTP/WebTest/API.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** API.pm 2 Jan 2003 20:49:49 -0000 1.27 --- API.pm 25 Jan 2003 17:45:51 -0000 1.28 *************** *** 251,254 **** --- 251,268 ---- } + =head2 parser_package($optional_parser_package) + + If $optional_parser is defined sets a parser package to use when + parsing wtscript files. Otherwise just returns current parser package. + + =head3 Returns + + The parser package. + + =cut + + *parser_package = make_access_method('PARSER_PACKAGE', + sub { 'HTTP::WebTest::Parser' }); + =head2 parse ($data) *************** *** 283,289 **** my $data = shift; ! # load parsing module on demand - it is quite heavy ! load_package('HTTP::WebTest::Parser'); ! my ($tests, $opts) = HTTP::WebTest::Parser->parse($data); return ($tests, $opts); --- 297,304 ---- my $data = shift; ! load_package('HTTP::WebTest::Parser') ! unless(UNIVERSAL::can($self->parser_package, 'parse')); ! ! my ($tests, $opts) = $self->parser_package->parse($data); return ($tests, $opts); |