File::Tempã®ä½¿ãæ¹ å ãã¿ã¯ãã¡ããã File::Tempãªãã¸ã§ã¯ãã¯ãã¡ã¤ã«ãã³ãã«ã§ãããåæã«overloadã使ç¨ããã¨æååã«è¦ãããã¨ããå¦ãªãªãã¸ã§ã¯ããªãã§ããããªã®ã§ã以ä¸ã®ã³ã¼ãã¯ç¡ç¨ my $expect = 'hogehoge'; my $out = File::Temp->new; diag $out; open my $fh, '>', $out; # ãã print $fh $expect; close $fh; my $contents < io $out; is $contents, $expect; File::Temp->new()ãã段éã§ãã§ã«FileHandleãªãã¸ã§ã¯ãã«ãªã£ã¦ããã¯ãããªã®ã§ããã¤ã«ç´æ¥æ¸ãè¾¼ããããã®ãå my $expect = 'hogehoge'; my $out = File::Temp->new;
{{#tags}}- {{label}}
{{/tags}}