X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/23b91e69b02065534e5c57449ec82d7fee9f93e0..f5a1550441a9d58652d93deacc333f143a7ecfbd:/IkiWiki/Plugin/calendar.pm?ds=inline

diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index 23246757b..45617afe8 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -115,7 +115,7 @@ sub build_affected {
 		$affected{calendarlink($ayear)} = sprintf(gettext("building calendar for %s, its previous or next year has changed"), $ayear) if ($valid);
 		($ayear, $valid) = previousyear($year, $config{archivebase});
 		$affected{calendarlink($ayear)} = sprintf(gettext("building calendar for %s, its previous or next year has changed"), $ayear) if ($valid);
-		foreach my $month (keys $changed{$year}) {
+		foreach my $month (keys %{$changed{$year}}) {
 			($ayear, $amonth, $valid) = nextmonth($year, $month, $config{archivebase});
 			$affected{calendarlink($ayear, sprintf("%02d", $amonth))} = sprintf(gettext("building calendar for %s/%s, its previous or next month has changed"), $amonth, $ayear) if ($valid);
 			($ayear, $amonth, $valid) = previousmonth($year, $month, $config{archivebase});
@@ -141,7 +141,9 @@ sub autocreate {
 	$template->param(month => $month) if defined $month;
 	$template->param(pagespec => $config{archive_pagespec});
 
+	no warnings 'once';
 	my $dir = $IkiWiki::Plugin::transient::transientdir;
+	use warnings;
 
 	writefile($pagefile, $dir, $template->output);
 }