>>>>> "DM" =3D=3D David McBride <dmc...@la...> writes:
DM> Hello,
DM> There are several examples in the documentation for using on_response i=
n a
DM> wtscript file, but I couldn=E2=80=99t find one for a perl script. =C2=A0
DM> I have a function called =E2=80=98get_doc_ids=E2=80=99 that I want to c=
all.=C2=A0 I
DM> tried setting it up as follows, but I got errors:
DM> ...=C2=A0
DM> # Problem happens on the line below =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
DM> on_response =3D> { @jobs =3D get_doc_ids($webtest->current_response->co=
ntent); },
Should be
on_response =3D> sub { @jobs =3D get_doc_ids($webtest->current_response->co=
ntent); },
This would create an anonymous sub which is being called later when
tests are being run.
DM> ...
DM> Can anyone tell me the correct syntax to use for =E2=80=98on_response=
=E2=80=99 in a perl
DM> script (as opposed to a wtscript file).=C2=A0 Thanks very much (in adva=
nce).
--=20
Ilya Martynov, il...@ip...
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support
UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org
|