X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6c87fdc5624ea6fb2dd4e8ed940f799ef0e618b9..623b428efeb5951188a5f92391bc2cc185b8bda0:/doc/todo/calendar_autocreate.mdwn diff --git a/doc/todo/calendar_autocreate.mdwn b/doc/todo/calendar_autocreate.mdwn index 46cfea3bd..2a7350b79 100644 --- a/doc/todo/calendar_autocreate.mdwn +++ b/doc/todo/calendar_autocreate.mdwn @@ -189,7 +189,7 @@ sub gencalendaryear { > > + 0 0 * * * ikiwiki ~/ikiwiki.setup --refresh > -> I think that should be `ikiwiki --setup ~/ikiwiki.setup`. +> I think that should be `ikiwiki --setup ~/ikiwiki.setup --refresh` > > The indentation of some of the new code in `IkiWiki/Plugin/calendar.pm` > is weird. Please use one hard tab (U+0009) per indent step: you seem @@ -212,12 +212,14 @@ sub gencalendaryear { > + } > + $changed{$params{year}}{$params{month}} = 1; > -> $changed{$params{year}} is a scalar but `()` is a list. I think you want `{}` +> `$changed{$params{year}}` is a scalar (you can tell because it starts with the +> `$` sigil) but `()` is a list. I think you want `{}` > (a scalar that is a reference to an empty anonymous hash). > > However, that whole `if` block can be omitted, and you can just use > `$changed{$params{year}}{$params{month}} = 1;`, because Perl will automatically -> create $changed{$params{year}} as a reference to a hash (the term to look +> create `$changed{$params{year}}` as a reference to an empty hash if necessary, +> in order to put the pair `$params{month} => 1` in it (the term to look > up if you're curious is "autovivification"). > > --[[smcv]]