{ # Would I expect a scope change to radically alter the time an # error is reported? # $x dies at the end of the block # $y dies at some indeterminate time in the future. my $x = Foo->new->method_that_fails->foo; our $y = Foo->new->method_that_fails->foo; }; # This will fail silently because $bar is an error object, $bar->next # will just return $self, which is then evaluated in a boolean context # so the DESTROY won't give an error. Would I remember to catch the # error explicitly in situations like this? What if that while loop # was off in another module? my $bar = $foo->method_that_fails while ($bar->next) { print $bar->current, "\n" }; # Would I expect an error about Foo creation when Bar objects # are destroyed? sub Bar::new { bless { foo => Foo->new->method_that_fails }, shift };