httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hedges <hed...@formdata.biz>
Subject suggestion for APR::Error docs
Date Tue, 21 Dec 2010 22:47:42 GMT

Seems to be some squirliness in this doc.  Is this more clear?  --mark--

--- /usr/lib/perl5/APR/Error.pm.orig    2010-12-21 14:42:28.000000000 -0800
+++ /usr/lib/perl5/APR/Error.pm 2010-12-21 14:45:11.000000000 -0800
@@ -109,13 +109,16 @@
 =head1 Synopsis

   eval { $obj->mp_method() };
-  if ($@ && $ref $@ eq 'APR::Error' && $@ == $some_code) {
-      # handle the exception
+  if (my $err = $@) {
+      if (ref $err eq 'APR::Error') {
+          if ($err == $apr_const_code) {
+              # handle exceptions for APR::Const codes...
+          }
+      }
+      else {
+          die $err;
+      }
   }
-  else {
-      die $@; # rethrow it
-  }
-

 =head1 Description





Mime
View raw message