Show
Ignore:
Timestamp:
07/23/08 13:56:18 (5 years ago)
Author:
daisuke
Message:

reuse user agent

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Google-Chart/branches/moose/lib/Google/Chart.pm

    r16114 r16118  
    1414    fallback => 1, 
    1515; 
     16our $USER_AGENT; 
    1617 
    1718use constant BASE_URI => URI->new("http://chart.apis.google.com/chart"); 
     
    5960    isa      => 'LWP::UserAgent', 
    6061    required => 1, 
    61     default  => sub { LWP::UserAgent->new() } 
     62    lazy     => 1, 
     63    default  => sub { $USER_AGENT ||= LWP::UserAgent->new() } 
    6264); 
    6365