The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sorauta::Cache::HTTP::Request::Image - create cache image when you got http request.

SYNOPSIS

  use Sorauta::Cache::HTTP::Request::Image;

  my $CACHE_PATH = '/tmp/';
  my $SAMPLE_URLS = [
    'http://www.google.co.jp/images/srpr/logo3w.png',
  #  'http://sorauta.net/images/common/author.jpg',
  ];
  my $MAX_WIDTH = 900;
  my $MAX_HEIGHT = 1600;
  my $DEBUG = 0; # show debug log
  my $CHECK = 0; # check updated cache image
  my $RENDER = 0; # show image

  # get test
  {
    # test url
    my $url = $SAMPLE_URLS->[int(rand(@$SAMPLE_URLS))];

    # create new cache image
    Sorauta::Cache::HTTP::Request::Image->new({
      cache_path            => $CACHE_PATH,
      url                   => $url,
      check                 => $CHECK,
      render                => $RENDER,
      debug                 => $DEBUG,
    })->execute;
  }

DESCRIPTION

create cache image when you got http request.

EXPORT

None by default.

SEE ALSO

Mention other useful documentation such as the documentation of related modules or operating system documentation (such as man pages in UNIX), or any relevant external documentation such as RFCs or standards.

If you have a mailing list set up for your module, mention it here.

If you have a web site set up for your module, mention it here.

AUTHOR

Yuki ANAI, <yuki@apple.com>

COPYRIGHT AND LICENSE

Copyright (C) 2012 by Yuki ANAI

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.