1. #!perl
  2. use warnings;
  3. use strict;
  4.  
  5. use LWP::UserAgent;
  6.  
  7. my $title = 'エントリタイトル';
  8. my $excerpt = 'エントリ要約ですよ';
  9. my $url = 'http://d.hatena.ne.jp/shibaTest/20101022/p1';
  10. my $blog_name = 'Dive into the Tech World!';
  11.  
  12. my $ua = LWP::UserAgent->new;
  13. $ua->timeout(10);
  14.  
  15. my $response = $ua->post(
  16. 'http://local.hatena.ne.jp:3000/shiba_yu36/20101022/1287724375', {
  17. title => $title,
  18. excerpt => $excerpt,
  19. url => $url,
  20. blog_name => $blog_name,
  21. },
  22. );
  23.  
  24. use YAML;
  25. warn YAML::Dump($response);