Revision: 1368
Author: [email protected]
Date: Mon Sep 27 03:44:39 2010
Log: Add exit status to error message.
May shed light on http://www.cpantesters.org/cpan/report/f3028c56-c89b-11df-abb6-b9df888ae478

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1368

Modified:
 /trunk/lib/Devel/NYTProf/Run.pm

=======================================
--- /trunk/lib/Devel/NYTProf/Run.pm     Tue May  4 03:47:24 2010
+++ /trunk/lib/Devel/NYTProf/Run.pm     Mon Sep 27 03:44:39 2010
@@ -78,14 +78,16 @@

     if (my $src_file = $opt{src_file}) {
         system(@perl, $src_file) == 0
-            or carp "@perl $src_file exited with an error status";
+            or carp "Exit status $? from @perl $src_file";
     }
     elsif (my $src_code = $opt{src_code}) {
         open my $fh, "| @perl"
             or croak "Can't open pipe to @perl";
         print $fh $src_code;
         close $fh
-            or carp "@perl exited with an error status";
+            or carp $! ? "Error closing @perl pipe: $!"
+                       : "Exit status $? from @perl";
+
     }
     else {
         croak "Neither src_file or src_code was provided";

--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to