title: How can I check if `File::Path::remove_tree` failed?
body: <p>I'm used to `... or die ".. failed... $!";.</p>
  
  <p>I was surprised to find that in order to know if <code>File::Path::remove_tree</code> failed or not I must do something like this:</p>
  
  <pre><code>remove_tree( 'foo/bar', 'bar/rat', {error =&gt; \my $err} );
  if (@$err) {
   die "error..."
  }
  </code></pre>
  
  <p>Am I missing something? Is this really the way to go?</p>
  
  <p>A lot of unneeded code for me...</p>