use strict;
use warnings;
use CGI;
use HTML::Calendar::Simple;
my $cgi = CGI->new;
print $cgi->header;
my $cal = HTML::Calendar::Simple->new({
'month' => 6,
'year' => 2005,
});
sub _display_events {
my $events = shift;
return join('
', map {
$cgi->a({ href => $_->[0] }, $_->[1])
} (@{$events}));
}
$cal->daily_info({
'day' => 21,
'events' => _display_events([
['http://perlmonks.org', 'PerlMonks'],
['http://whitepages.com', 'Whitepages']
]),
});
print $cal->calendar_month;