~/devel $ diff devel-examine-subs/t/02-has.t Devel-Examine-Subs-1.23/t/02-has.t ~/devel $ ~/devel $ diff devel-examine-subs/t/sample.data Devel-Examine-Subs-1.23/t/sample.data ~/devel $ #### ~/devel/devel-examine-subs $ perl t/02-has.t 1..26 ok 1 - use Devel::Examine::Subs; ok 2 - new() dies with error if file not found ok 3 - has() returns an array ref file exists and text available ... #### ~/devel/Devel-Examine-Subs-1.23 $ perl t/02-has.t 1..26 ok 1 - use Devel::Examine::Subs; ok 2 - new() dies with error if file not found Use of uninitialized value in pattern match (m//) at t/02-has.t line 23. not ok 3 - has() returns an array ref file exists and text available # Failed test 'has() returns an array ref file exists and text available' # at t/02-has.t line 23. ... #### #!perl use warnings; use strict; use Test::More tests => 26; use Data::Dumper; BEGIN {#1 use_ok( 'Devel::Examine::Subs' ) || print "Bail out!\n"; } my $des = Devel::Examine::Subs->new({file => 't/sample.data'}); {#2 my $des2 = Devel::Examine::Subs->new(); eval { $des2->has({ file => 'badfile.none'}) }; ok ( $@ =~ /Invalid file supplied/, "new() dies with error if file not found " ); } {#3 my $des = Devel::Examine::Subs->new(); my $res = $des->has({ file => 't/sample.data', search => 'this' }); ok ( $res->[0] =~ '\w+', "has() returns an array ref file exists and text av ailable" ); }