こんにちは!こんばんは!寒いのがめっぽう苦手、bayashi です! きょうは、HTTP通信を伴うモジュールのテストについて書いてみます! サンプルモジュール WWW::Foo8 具体的に説明するために、WWW::Foo8 というモジュールを書きました! package WWW::Foo8; use strict; use warnings; our $VERSION = '0.01'; use Class::Accessor::Lite ( rw => [qw/agent error/], ); sub new { my ($class, %args) = @_; $args{agent} = _default_agent() unless $args{agent}; bless \%args, $class; } sub get { my ($self, $uri) = @_; my
![HTTP通信を含むモジュールのテスト - Articles Advent Calendar 2011 Test](https://cdn-ak-scissors.b.st-hatena.com/image/square/49f39e5d88a50ae6f78255b6e2d3a8a79a7aa004/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fkfly8%2Fimage%2Fupload%2Fl_text%3ANotoSansJP-Black.otf_50_bold%3AHTTP%25E9%2580%259A%25E4%25BF%25A1%25E3%2582%2592%25E5%2590%25AB%25E3%2582%2580%25E3%2583%25A2%25E3%2582%25B8%25E3%2583%25A5%25E3%2583%25BC%25E3%2583%25AB%25E3%2581%25AE%25E3%2583%2586%25E3%2582%25B9%25E3%2583%2588%2Cco_rgb%3A000000%2Cw_900%2Cc_fit%2Fl_text%3ANotoSansJP-Black.otf_30_bold%3Abayashi%2Cco_rgb%3A000000%2Cg_south_east%2Cx_130%2Cy_120%2Fv1601626948%2Fog-perl-users-jp.png)