]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/calendar_autocreate.mdwn
clarify further
[ikiwiki.git] / doc / todo / calendar_autocreate.mdwn
index 46cfea3bd194d27b613b3fd3817113292fb6345c..2a7350b79ef3656ac4f334d3415f6a8fdf4d378b 100644 (file)
@@ -189,7 +189,7 @@ sub gencalendaryear {
 >
 >     +    0 0 * * * ikiwiki ~/ikiwiki.setup --refresh
 >
 >
 >     +    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
 >
 > 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}}{$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
 > (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]]
 > up if you're curious is "autovivification").
 >
 > --[[smcv]]