App-PrereqGrapher

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.10 2014-02-02
    - Don't write to STDERR unless verbose option was given
    - Now used different filenames for each test, maybe that's
      causing the fails ...

0.09 2014-02-01
    - Changed the test filenames to fit in 8.3, in case that's
      why my Win32 tests are failing...

0.08 2014-02-01
    - After creating files in testsuite, chmod 0600 them before unlinking.
      Hopefully that will fix some test failures on Win32...

0.07 2014-01-30
    - Specified min perl version 5.6.0

0.06 2012-12-09
    - Added -timeout option to prereq-grapher and timeout param to App::PrereqGrapher
    - Made a change to hopefully address some Win32 failures from CPAN Testers

0.05 2012-12-05

t/generate-dot.t  view on Meta::CPAN


use Test::More 0.88 tests => 4;
use File::Compare;

use App::PrereqGrapher;
my $grapher;

$grapher = App::PrereqGrapher->new(format => 'dot', output_file => 'example1.dot');
$grapher->generate_graph('Module::Path');
ok(compare('example1.dot', 'module-path.dot'), 'Check graph for Module::Path');
chmod(0600, 'example1.dot');
ok(unlink('example1.dot'), "remove graph after running test");

$grapher = App::PrereqGrapher->new(depth => 2, format => 'dot', output_file => 'example2.dot');
$grapher->generate_graph('Module::Path');
ok(compare('example2.dot', 'module-path-depth-2.dot'), 'Check graph for Module::Path to depth 2');
chmod(0600, 'example2.dot');
ok(unlink('example2.dot'), "remove graph after running test");

t/prereq-grapher.t  view on Meta::CPAN

use File::Spec::Functions;
use Devel::FindPerl qw(find_perl_interpreter);
use File::Compare;

my $filename = 'example3.dot';
my $PERL     = find_perl_interpreter() || die "can't find perl!\n";
my $GRAPHER  = catfile( $FindBin::Bin, updir(), qw(bin prereq-grapher) );

system("'$PERL' '$GRAPHER' -o $filename -dot Module::Path");
ok(compare($filename, 'module-path.dot'), 'Check graph for Module::Path');
chmod(0666, $filename);
if (!unlink($filename)) {
    warn "Failed to unlink $filename: $!\n";
}



( run in 0.401 second using v1.01-cache-2.11-cpan-496ff517765 )