]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
clarif
authorsmcv <smcv@web>
Wed, 10 Sep 2014 08:42:24 +0000 (04:42 -0400)
committeradmin <admin@branchable.com>
Wed, 10 Sep 2014 08:42:24 +0000 (04:42 -0400)
doc/todo/calendar_autocreate.mdwn

index e25c45cb2c5aa717a6db386de9e7905241b41170..8e6a1a0d0c399dcc459492213862a470779e1dbd 100644 (file)
@@ -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, in order to
+> put the pair `$params{month} => 1` in it (the term to look
 > up if you're curious is "autovivification").
 >
 > --[[smcv]]