Bank-Holidays
view release on metacpan or search on metacpan
0.84 Mon Jan 09 21:17:00 2017
- Fixed failing tests
- Small, misc changes
0.82 Sun Jul 19 22:48:00 2015
- Remove EXPORTER and exported functions, because none
worked without the `new' constructor.
- Added perldoc regarding the above.
- Remove indirectly built LWP::UserAgent and
HTTP::Request objects.
- Minor documentation updates.
- Author: CSEATON
0.81 Fri Jul 10 12:20:00 2015
- Convert tests to Test::More
- Support 'date' parameter in constructor as per the
example in the SYNOPSIS.
- Author: CSEATON
0.79 Mon Nov 11 19:40:00 2013
lib/Bank/Holidays.pm view on Meta::CPAN
my $content;
if ( -f $cache && ( time() - ( stat($cache) )[9] ) < 86400 ) {
open my $fh, "<", $cache or die $!;
$content = do { local $/ = <$fh> };
close $fh;
}
else {
my $url = 'http://www.federalreserve.gov/aboutthefed/k8.htm';
my $request = HTTP::Request->new( 'GET', $url );
my $response = $ua->request($request);
$content = $response->content();
open my $fh, ">", $cache or die $!;
print {$fh} $content;
close $fh;
}
( run in 0.614 second using v1.01-cache-2.11-cpan-de7293f3b23 )