Create with_items example with a registered var

Updated with comments from mdehaan.  The example is still a little inane, but it is better than using stat.