????Test::Nginx??????????Nginx????????perl???????????????????д??????nginx???????????????Nginx?????????????????????http???????????????????????????????ò????????á?

??????????

??????????????Test::Nginx???????г???????????????????????????Nginx?????????????????????????????????????????????????????

????????????

???????Test::Nginx????????????乹????????perl?е??????????????new()????????????????????????????????е??????????????????£?

????????$self->{_testdir}?????hash??????????/tmp/??????′??????nginx-test-XXXXXXXXXX??????У?XXXXXXXXXX?????Щλ??????????????????ɡ?????????????????????????????????????????

????????????????????Test::Nginx->new()?????Test::Nginx???????

????Nginx????????????

????Nginx??????????????write_file_expand()???????????ú????????????????????????????????????????????????????????????????????????????????????????????????????????д????????????write_file_expand('nginx.conf'?? <<'EOF')?????????η?????????棬'EOF'?????????????????????????????ú?????????????????????ò?????????д???????С?

??????????write_file_expand()????????????????????????????·???????????У????·???′???Nginx.conf?????????$self->write_file($name?? $content)??????д????????????д???????е??

????Nginx ?????????????

????Nginx ????????????????????run()???????е???????run()????????0?????????????????Ρ?run()???????????????????????nginx????????????????????????????????????$self->{_started}?????nginx?????????????$self->{_started}?????1????ò????????????????????????

??????????????????????

???????????????????Test::Nginx???????????http_get()???????÷???http_get()??????java?е???????????????????Test::Nginx????????????á??÷???????????????????hash?????????Σ??÷????????http()???????????????????????