<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>t/return_values.t</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,27 @@
 Changes
+examples/MyCPANConfig.pm
 lib/Cpan.pm
 Makefile.PL
 MANIFEST
 script/cpan
 t/compile.t
+t/install_hack.t
+t/lib/CPAN.pm
+t/lib/CPAN/Config.pm
+t/mock.t
 t/pod.t
 t/pod_coverage.t
+t/process_options.t
+t/process_setup_options.t
+t/return_values.t
 t/test_manifest
+test-mirror/authors/01mailrc.txt.gz
+test-mirror/authors/id/B/BU/BUSTER/CHECKSUMS
+test-mirror/authors/id/B/BU/BUSTER/Local-Make-Fails.tgz
+test-mirror/authors/id/B/BU/BUSTER/Local-Prereq-Fails.tgz
+test-mirror/authors/id/B/BU/BUSTER/Local-Test-Fails.tgz
+test-mirror/authors/id/B/BU/BUSTER/Local-Unsupported-OS.tgz
+test-mirror/authors/id/B/BU/BUSTER/Local-Works-Fine.tgz
+test-mirror/authors/id/B/BU/BUSTER/Make.pl
+test-mirror/modules/02packages.details.txt
+test-mirror/modules/03modlist.data.gz</diff>
      <filename>MANIFEST</filename>
    </modified>
    <modified>
      <diff>@@ -15,3 +15,6 @@ cpan-.*
 .old$
 \.#
 \.git
+TO_DO
+test-mirror/authors/id/B/BU/BUSTER/.*(Fails|OS|Fine)/
+cpan-home</diff>
      <filename>MANIFEST.SKIP</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 # $Id$
 use ExtUtils::MakeMaker;
 
-require 5.006;
+require 5.008;
 
-eval &quot;use Test::Manifest 1.14&quot;;
+eval &quot;use Test::Manifest 1.21&quot;;
 
 WriteMakefile(
 	'NAME'		    =&gt; 'App::Cpan',
@@ -26,7 +26,7 @@ WriteMakefile(
 		
 	'PREREQ_PM' =&gt; {
 		'Test::More' =&gt; '0',
-		'CPAN'       =&gt; '0',
+		'CPAN'       =&gt; '1.9301',
 		},
 
 	'MAN1PODS'       =&gt; {},</diff>
      <filename>Makefile.PL</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use vars qw($VERSION);
 
-$VERSION = '1.55_04';
+$VERSION = '1.56_01';
 
 =head1 NAME
 
@@ -302,6 +302,8 @@ sub run
 	
 	my $return_value = HEY_IT_WORKED; # assume that things will work
 	
+	$class-&gt;_hook_into_CPANpm_report;
+	
 	$class-&gt;_stupid_interface_hack_for_non_rtfmers;
 	
 	my $options = $class-&gt;_process_options;
@@ -373,14 +375,52 @@ sub _default
 	
 	foreach my $arg ( @$args ) 
 		{		
-		my $rc = CPAN::Shell-&gt;$method( $arg );
-		$errors++ unless defined $rc;
+		_clear_scalar();
+		CPAN::Shell-&gt;$method( $arg );
+		my $output = _get_scalar();
+
+		my @lines = split /\n/, $output;
+		$errors = grep { /NOT OK/ } @lines;
 		}
 
-	$errors ? I_DONT_KNOW_WHAT_HAPPENED ? HEY_IT_WORKED;
+	$errors ? I_DONT_KNOW_WHAT_HAPPENED : HEY_IT_WORKED;
 	}
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
+
+=for comment
+
+CPAN.pm sends all the good stuff either to STDOUT, or to a temp
+file if $CPAN::Be_Silent is set. I have to intercept that output
+so I can find out what happened.
+
+=cut
+
+{
+my( $fh, $scalar );
+
+sub _hook_into_CPANpm_report
+	{
+	if( defined $fh ) { return ( $fh, $scalar ) }
+	
+	require CPAN;
+	
+	$CPAN::Be_Silent = 1;
+	
+	open $fh, &quot;&gt;&quot;, \ $scalar;
+	
+	no warnings 'redefine';
+	
+	*CPAN::Shell::report_fh = sub { $fh };
+	
+	return ( $fh, $scalar ); 
+	}
+	
+sub _clear_scalar { $scalar = '' }
+	
+sub _get_scalar   { $scalar }
+}
+
 sub _print_help
 	{
 	print STDERR &quot;Use perldoc to read the documentation\n&quot;;
@@ -391,6 +431,8 @@ sub _print_version
 	{
 	print STDERR &quot;$0 script version $VERSION, CPAN.pm version &quot; . 
 		CPAN-&gt;VERSION . &quot;\n&quot;;
+
+	return HEY_IT_WORKED;
 	}
 	
 sub _create_autobundle
@@ -399,6 +441,8 @@ sub _create_autobundle
 		&quot;/Bundle\n&quot;;
 
 	CPAN::Shell-&gt;autobundle;
+
+	return HEY_IT_WORKED;
 	}
 
 sub _recompiling
@@ -406,9 +450,11 @@ sub _recompiling
 	print &quot;Recompiling dynamically-loaded extensions\n&quot;;
 
 	CPAN::Shell-&gt;recompile;
+
+	return HEY_IT_WORKED;
 	}
 
-sub _load_config
+sub _load_config # -j
 	{	
 	my $file = shift || '';
 	
@@ -427,7 +473,7 @@ sub _load_config
 	
 	die( &quot;Could not load [$file]: $@\n&quot;) unless $rc;
 	
-	return 1;
+	return HEY_IT_WORKED;
 	}
 
 sub _dump_config
@@ -444,7 +490,7 @@ sub _dump_config
 		
 	print $fh $dd-&gt;Dump, &quot;\n1;\n__END__\n&quot;;
 	
-	return 1;
+	return HEY_IT_WORKED;
 	}
 
 sub _download
@@ -522,6 +568,8 @@ sub _gitify
 		}
 	
 	chdir $starting_dir;
+
+	return HEY_IT_WORKED;
 	}
 
 sub _show_Changes
@@ -544,6 +592,8 @@ sub _show_Changes
 		#print &quot;URL: $url\n&quot;;
 		_get_changes_file($url);
 		}
+
+	return HEY_IT_WORKED;
 	}	
 	
 sub _get_changes_file
@@ -564,6 +614,8 @@ sub _get_changes_file
 	my $changes =  LWP::Simple::get( $changes_url );
 	#print &quot;change text is: &quot; . $change_link-&gt;text() . &quot;\n&quot;;
 	print $changes;
+
+	return HEY_IT_WORKED;
 	}
 	
 sub _show_Author
@@ -586,6 +638,8 @@ sub _show_Author
 		printf &quot;%-25s %-8s %-25s %s\n&quot;, 
 			$arg, $module-&gt;userid, $author-&gt;email, $author-&gt;fullname;
 		}
+
+	return HEY_IT_WORKED;
 	}	
 
 sub _show_Details
@@ -612,6 +666,8 @@ sub _show_Details
 		print &quot;\n\n&quot;;
 		
 		}
+		
+	return HEY_IT_WORKED;
 	}	
 
 sub _show_out_of_date
@@ -631,6 +687,7 @@ sub _show_out_of_date
 			$module-&gt;cpan_version;
 		}
 
+	return HEY_IT_WORKED;
 	}
 
 sub _show_author_mods
@@ -647,6 +704,7 @@ sub _show_author_mods
 		print $module-&gt;id, &quot;\n&quot;;
 		}
 	
+	return HEY_IT_WORKED;
 	}
 	
 sub _list_all_mods
@@ -675,6 +733,8 @@ sub _list_all_mods
 			#last if $count++ &gt; 5;
 			}
 		}
+
+	return HEY_IT_WORKED;
 	}
 	
 sub _generator
@@ -754,6 +814,7 @@ sub _path_to_module
 	
 	return $module_name;
 	}
+
 1;
 
 =back</diff>
      <filename>lib/Cpan.pm</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ use strict;
 use vars qw($VERSION);
 
 use App::Cpan;
-$VERSION = '1.55_03';
+$VERSION = '1.56_01';
 
 my $rc = App::Cpan-&gt;run( @ARGV );
 </diff>
      <filename>script/cpan</filename>
    </modified>
    <modified>
      <diff>@@ -4,3 +4,4 @@ pod_coverage.t
 mock.t
 install_hack.t
 process_options.t
+return_values.t</diff>
      <filename>t/test_manifest</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e3157ebad9be262d3831afb415e6361db00300eb</id>
    </parent>
  </parents>
  <author>
    <name>brian d foy</name>
    <email>brian.d.foy@gmail.com</email>
  </author>
  <url>http://github.com/briandfoy/cpan-script/commit/8a7ebf49b8d8354ff20d8f670e41589fcea24525</url>
  <id>8a7ebf49b8d8354ff20d8f670e41589fcea24525</id>
  <committed-date>2009-01-29T02:50:09-08:00</committed-date>
  <authored-date>2009-01-29T02:50:09-08:00</authored-date>
  <message>* Add tests to check the return values for attempting to
install modules.

* Hijack CPAN.pm's output and use that to figure out
what happened.

* Clean up the dist for the latest stuff, and require 5.8 and
the latest CPAN.pm now.</message>
  <tree>868310523196eeb69b6bb677c7c89ef70a024be7</tree>
  <committer>
    <name>brian d foy</name>
    <email>brian.d.foy@gmail.com</email>
  </committer>
</commit>
