Page 13 tells use about C<let> decls. But it also says that the topic must
be a regex. Whilst it explains that this isn't really a problem, I'm not
sure that it justifies it. So perhaps someone can clarify why this
(hypothetical) code in not a reasonable generalization:


our $foo = 0;

sub do_something
{
  let $foo = $foo + 1;
  # stuff ...
  commit();
}

sub commit
{
  fail if rand < 0.3;
}

for 1..10
{
  do_something()
  CATCH { default {} }
}

print "$foo\n"; # expect a value of around 7



Dave.

Reply via email to